Fill output parameters of libprovider on creating new box
authorYunchan Cho <yunchan.cho@samsung.com>
Wed, 17 Apr 2013 06:00:43 +0000 (15:00 +0900)
committerYunchan Cho <yunchan.cho@samsung.com>
Wed, 17 Apr 2013 11:54:02 +0000 (20:54 +0900)
[Issue#] N/A
[Problem] when firt livebox is created, the livebox is not displayed on Viewer
[Cause] web-provider didn't fill output parameter regarding width, height of created livebox
[Solution] web-provider fills the parameters using width, height of livebox

Change-Id: Ifb88edfc4e9e660b17cdee5b4b7b0c5825d39d25

src/Daemon/BoxDaemonImpl.cpp

index 781b4ed..2dfb55f 100644 (file)
@@ -125,12 +125,13 @@ int BoxDaemonImpl::boxCreateCallback(
 
     if ((arg->info.lb_create.width == 0) || (arg->info.lb_create.height == 0)) {
         livebox_service_get_size(LB_SIZE_TYPE_1x1, width, height);
-        arg->info.lb_create.width = *width;
-        arg->info.lb_create.height = *height;
+    } else {
+        *width = arg->info.lb_create.width;
+        *height = arg->info.lb_create.height;
     }
 
-    info->boxWidth = arg->info.lb_create.width;
-    info->boxHeight = arg->info.lb_create.height;
+    info->boxWidth = *width;
+    info->boxHeight = *height;
     info->priority = 1.0f;
     info->period = arg->info.lb_create.period;
     if (arg->info.lb_create.content) {