Trigger the updated event after get a created event.
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 7 Nov 2014 04:46:57 +0000 (13:46 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 7 Nov 2014 04:46:57 +0000 (13:46 +0900)
if there is updated content.

[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: Ieb5fb2bfe98e0e333b93944c445317a355b4ca39

src/client.c

index 84bf0a7..087d320 100644 (file)
@@ -1863,6 +1863,23 @@ static struct packet *master_created(pid_t pid, int handle, const struct packet
            } else {
                dbox_invoke_event_handler(handler, DBOX_EVENT_CREATED);
            }
+
+           /**
+            * If there is any updates before get this event,
+            * Invoke all update event forcely
+            */
+           switch (common->dbox.last_extra_buffer_idx) {
+           case DBOX_UNKNOWN_BUFFER:
+               break;
+           case DBOX_PRIMARY_BUFFER:
+               DbgPrint("Primary buffer updated\n");
+               dbox_invoke_event_handler(handler, DBOX_EVENT_DBOX_UPDATED);
+               break;
+           default:
+               DbgPrint("Extra buffer updated\n");
+               dbox_invoke_event_handler(handler, DBOX_EVENT_DBOX_EXTRA_UPDATED);
+               break;
+           }
        }
     }