Sync with the latest code of phone profile
[platform/framework/web/data-provider-master.git] / src / package.c
index 2aa6e20..24b0017 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <dlog.h>
 #include <Eina.h>
-#include <Ecore_Evas.h>
 
 #include <packet.h>
 #include <livebox-errno.h>
@@ -282,11 +281,9 @@ static int slave_resumed_cb(struct slave_node *slave, void *data)
 
 static inline void destroy_package(struct pkg_info *info)
 {
-       struct context_info *ctx_info __attribute__((unused));
-
-       EINA_LIST_FREE(info->ctx_list, ctx_info) {
-               /* This items will be deleted from group_del_livebox */
-       }
+       eina_list_free(info->ctx_list);
+       /* This items will be deleted from group_del_livebox */
+       info->ctx_list = NULL;
 
        group_del_livebox(info->lbid);
        package_clear_fault(info);
@@ -1141,15 +1138,15 @@ HAPI int package_add_instance(struct pkg_info *info, struct inst_info *inst)
                        DbgPrint("Slave %s is used for %s\n", slave_name(info->slave), info->lbid);
                }
 
-               slave_ref(info->slave);
+               (void)slave_ref(info->slave);
                slave_load_package(info->slave);
-               slave_event_callback_add(info->slave, SLAVE_EVENT_DEACTIVATE, slave_deactivated_cb, info);
-               slave_event_callback_add(info->slave, SLAVE_EVENT_ACTIVATE, slave_activated_cb, info);
-               slave_event_callback_add(info->slave, SLAVE_EVENT_FAULT, slave_fault_cb, info);
+               (void)slave_event_callback_add(info->slave, SLAVE_EVENT_DEACTIVATE, slave_deactivated_cb, info);
+               (void)slave_event_callback_add(info->slave, SLAVE_EVENT_ACTIVATE, slave_activated_cb, info);
+               (void)slave_event_callback_add(info->slave, SLAVE_EVENT_FAULT, slave_fault_cb, info);
 
                if (info->secured) {
-                       slave_event_callback_add(info->slave, SLAVE_EVENT_PAUSE, slave_paused_cb, info);
-                       slave_event_callback_add(info->slave, SLAVE_EVENT_RESUME, slave_resumed_cb, info);
+                       (void)slave_event_callback_add(info->slave, SLAVE_EVENT_PAUSE, slave_paused_cb, info);
+                       (void)slave_event_callback_add(info->slave, SLAVE_EVENT_RESUME, slave_resumed_cb, info);
 
                        /*!
                         * \note
@@ -1159,8 +1156,8 @@ HAPI int package_add_instance(struct pkg_info *info, struct inst_info *inst)
                         *
                         * This callback will freeze the timer only if a slave doesn't running.
                         */
-                       xmonitor_add_event_callback(XMONITOR_PAUSED, xmonitor_paused_cb, info);
-                       xmonitor_add_event_callback(XMONITOR_RESUMED, xmonitor_resumed_cb, info);
+                       (void)xmonitor_add_event_callback(XMONITOR_PAUSED, xmonitor_paused_cb, info);
+                       (void)xmonitor_add_event_callback(XMONITOR_RESUMED, xmonitor_resumed_cb, info);
                }
        }
 
@@ -1524,7 +1521,7 @@ HAPI int package_alter_instances_to_client(struct client_node *client, enum alte
                                        break;
                                case ALTER_DESTROY:
                                        if (instance_has_client(inst, client)) {
-                                               instance_unicast_deleted_event(inst, client);
+                                               instance_unicast_deleted_event(inst, client, LB_STATUS_SUCCESS);
                                                instance_del_client(inst, client);
                                        }
                                        break;