Prevent from duplicated event subscription.
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]
Change-Id: I4a60a46f5095c23b37e56393ebaad9890b115abd
{
struct event_listener *listener;
int ret = DBOX_STATUS_ERROR_NONE;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(s_info.event_listener_list, l, listener) {
+ if (listener->event_cb == event_cb && listener->cbdata == data) {
+ ErrPrint("Already registered\n");
+ return DBOX_STATUS_ERROR_ALREADY;
+ }
+ }
listener = malloc(sizeof(*listener));
if (!listener) {