Update PD_Destroy request API
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 28 May 2013 05:41:00 +0000 (14:41 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 28 May 2013 05:41:00 +0000 (14:41 +0900)
[model] Tizen
[binary_type] AP
[customer] Tizen Developers
[issue#] N/A
[problem] Need to send pd destroy request even if it is in creating.
[cause] PD cannot be created in short time, in the worst case.
[solution] Send the destroy request to the master even if the pd is not created yet.
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: Iacd4583c6189705b370df5fa7e01e8418820c625

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

index 529589c..ec08f6e 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;
        }