+ if (ret == LB_STATUS_ERROR_BUSY) {
+ ret = livebox_acquire_lb_pixmap(handler, cb, cbdata);
+ DbgPrint("Busy, Try again: %d\n", ret);
+ /* Try again */
+ } else {
+ if (cb) {
+ cb(handler, pixmap, cbdata);
+ }
+ }
+}
+
+static void pd_pixmap_acquired_cb(struct livebox *handler, const struct packet *result, void *data)
+{
+ int pixmap;
+ int ret;
+ ret_cb_t cb;
+ void *cbdata;
+ struct cb_info *info = data;
+
+ cb = info->cb;
+ cbdata = info->data;
+ destroy_cb_info(info);
+
+ if (!result) {
+ pixmap = 0; /* PIXMAP 0 means error */
+ ret = LB_STATUS_ERROR_FAULT;
+ } else if (packet_get(result, "ii", &pixmap, &ret) != 2) {
+ pixmap = 0;
+ ret = LB_STATUS_ERROR_INVALID;
+ }
+
+ if (ret == LB_STATUS_ERROR_BUSY) {
+ ret = livebox_acquire_pd_pixmap(handler, cb, cbdata);
+ DbgPrint("Busy, Try again: %d\n", ret);
+ /* Try again */
+ } else {
+ if (cb) {
+ DbgPrint("ret: %d, pixmap: %d\n", ret, pixmap);
+ cb(handler, pixmap, cbdata);
+ }
+ }