Don't block the destroy request, while creating it
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 28 May 2013 02:38:41 +0000 (11:38 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 28 May 2013 05:42:26 +0000 (14:42 +0900)
[model] Redwood
[binary_type] AP
[customer] Docomo/Orange/Open
[issue#] N/A
[problem] While creating a PD, user cannot send request for destroying the PD
[cause] Destroy function only concerns created flag.
[solution] Check the registered callback too.
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: I088b1c83927fe2cdb58b8f5c07461a5542418b1a

packaging/liblivebox-viewer.spec
src/client.c
src/livebox.c

index df392ac..f5c8a05 100644 (file)
@@ -1,6 +1,6 @@
 Name: liblivebox-viewer
 Summary: Library for developing the application.
-Version: 0.13.3
+Version: 0.13.4
 Release: 1
 Group: HomeTF/Livebox
 License: Flora License
index 18cbbec..b0ad235 100644 (file)
@@ -571,7 +571,7 @@ static struct packet *master_pd_created(pid_t pid, int handle, const struct pack
 
                DbgPrint("pd_created_cb (%s) - %d\n", buf_id, status);
                cb(handler, status, cbdata);
-       } else if (status == 0) {
+       } else if (handler->is_pd_created) {
                DbgPrint("LB_EVENT_PD_CREATED (%s) - %d\n", buf_id, status);
                lb_invoke_event_handler(handler, LB_EVENT_PD_CREATED);
        }
index 19fc458..c3a112a 100644 (file)
@@ -1287,7 +1287,7 @@ EAPI int livebox_destroy_pd(struct livebox *handler, ret_cb_t cb, void *data)
                return LB_STATUS_ERROR_INVALID;
        }
 
-       if (!handler->is_pd_created) {
+       if (!handler->is_pd_created && !handler->pd_created_cb) {
                ErrPrint("PD is not created\n");
                return LB_STATUS_ERROR_INVALID;
        }