From: Manuel Bachmann Date: Tue, 3 Jun 2014 12:00:05 +0000 (+0200) Subject: Fix the list emptying logic. X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fappfw%2Fnotification-service.git;a=commitdiff_plain;h=5d418284e4d9012d71b938196c3dc012710ef59b Fix the list emptying logic. Change-Id: I6fda7f02968a354eb47f8111eeaefc0eae5faf1b Signed-off-by: Manuel Bachmann --- diff --git a/notification_display_service.c b/notification_display_service.c index e039088..a1b56f1 100644 --- a/notification_display_service.c +++ b/notification_display_service.c @@ -31,7 +31,7 @@ void display_notifications () notification_get_list (NOTIFICATION_TYPE_NOTI, -1, ¬ification_list); if (notification_list) { get_list = notification_list_get_head (notification_list); - if (get_list) { + while (get_list) { noti = notification_list_get_data (get_list); notification_get_pkgname (noti, &pkgname); if (pkgname == NULL) @@ -50,7 +50,8 @@ void display_notifications () wlmessage_destroy (wlmessage); # endif - notification_delete (noti); + get_list = notification_list_remove(get_list, noti); + notification_delete(noti); } } }