projects
/
platform
/
framework
/
web
/
livebox-viewer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Propagate the reason of box deletion
[platform/framework/web/livebox-viewer.git]
/
src
/
client.c
diff --git
a/src/client.c
b/src/client.c
index
eb0f471
..
8866148
100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-161,8
+161,9
@@
static struct packet *master_deleted(pid_t pid, int handle, const struct packet
const char *id;
double timestamp;
struct livebox *handler;
const char *id;
double timestamp;
struct livebox *handler;
+ int reason;
- if (packet_get(packet, "ssd
", &pkgname, &id, ×tamp) != 3
) {
+ if (packet_get(packet, "ssd
i", &pkgname, &id, ×tamp, &reason) != 4
) {
ErrPrint("Invalid arguemnt\n");
goto out;
}
ErrPrint("Invalid arguemnt\n");
goto out;
}
@@
-219,7
+220,7
@@
static struct packet *master_deleted(pid_t pid, int handle, const struct packet
handler->created_cb = NULL;
handler->created_cbdata = NULL;
handler->created_cb = NULL;
handler->created_cbdata = NULL;
- cb(handler,
LB_STATUS_ERROR_CANCEL
, cbdata);
+ cb(handler,
reason
, cbdata);
} else if (handler->id) {
if (handler->deleted_cb) {
ret_cb_t cb;
} else if (handler->id) {
if (handler->deleted_cb) {
ret_cb_t cb;
@@
-231,7
+232,7
@@
static struct packet *master_deleted(pid_t pid, int handle, const struct packet
handler->deleted_cb = NULL;
handler->deleted_cbdata = NULL;
handler->deleted_cb = NULL;
handler->deleted_cbdata = NULL;
- cb(handler,
LB_STATUS_SUCCESS
, cbdata);
+ cb(handler,
reason
, cbdata);
} else {
lb_invoke_event_handler(handler, LB_EVENT_DELETED);
}
} else {
lb_invoke_event_handler(handler, LB_EVENT_DELETED);
}