From: Sung-jae Park Date: Wed, 12 Nov 2014 14:30:35 +0000 (+0900) Subject: Propagate failure of sending updated event via socket X-Git-Tag: accepted/tizen/mobile/20150530.065423^2~18^2~13^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f71057b4b65e9c435147258cac29c9349c9b7481;p=apps%2Fnative%2Fwidget%2Fwidget.git Propagate failure of sending updated event via socket [model] Redwood,Kiran,B3(Wearable) [binary_type] AP [customer] Docomo/Orange/ATT/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: I370858203c586d5828a00f144395538c5abd1b0d --- diff --git a/src/dynamicbox.c b/src/dynamicbox.c index 9f3040c..614d20f 100644 --- a/src/dynamicbox.c +++ b/src/dynamicbox.c @@ -832,6 +832,7 @@ PUBLIC int dynamicbox_sync_buffer(dynamicbox_buffer_h handle) int w; int h; int pixel_size; + int ret; if (!handle) { return DBOX_STATUS_ERROR_INVALID_PARAMETER; @@ -871,18 +872,12 @@ PUBLIC int dynamicbox_sync_buffer(dynamicbox_buffer_h handle) * manipulate the damaged region, so send update event only for the damaged region. * to make more efficient updates */ - - if (user_data->is_gbar == 1) { - if (send_updated(pkgname, id, handle, DBOX_PRIMARY_BUFFER, 0, 0, w, h, user_data->is_gbar, NULL) < 0) { - ErrPrint("Failed to send GBAR updated (%s)\n", id); - } - } else { - if (send_updated(pkgname, id, handle, DBOX_PRIMARY_BUFFER, 0, 0, w, h, user_data->is_gbar, NULL) < 0) { - ErrPrint("Failed to send updated (%s)\n", id); - } + ret = send_updated(pkgname, id, handle, DBOX_PRIMARY_BUFFER, 0, 0, w, h, user_data->is_gbar, NULL); + if (ret < 0) { + ErrPrint("Failed to send%supdated (%s)\n", user_data->is_gbar ? " GBAR " : " ", id); } - return DBOX_STATUS_ERROR_NONE; + return ret; } PUBLIC int dynamicbox_send_updated_by_idx(dynamicbox_buffer_h handle, int idx) @@ -919,7 +914,7 @@ PUBLIC int dynamicbox_send_updated_by_idx(dynamicbox_buffer_h handle, int idx) ret = send_updated(pkgname, id, handle, idx, 0, 0, w, h, user_data->is_gbar, NULL); if (ret < 0) { - ErrPrint("Failed to send GBAR updated (%s) %d\n", id, idx); + ErrPrint("Failed to send%supdated (%s) %d\n", user_data->is_gbar ? " GBAR " : " ", id, idx); } return ret; @@ -1076,12 +1071,13 @@ PUBLIC int dynamicbox_buffer_post_render(dynamicbox_buffer_h handle) * to make more efficient updates */ - if (send_updated(pkgname, id, handle, DBOX_PRIMARY_BUFFER, 0, 0, w, h, user_data->is_gbar, NULL) < 0) { - ErrPrint("Failed to send GBAR updated (%s)\n", id); + ret = send_updated(pkgname, id, handle, DBOX_PRIMARY_BUFFER, 0, 0, w, h, user_data->is_gbar, NULL); + if (ret < 0) { + ErrPrint("Failed to send%supdated (%s)\n", user_data->is_gbar ? " GBAR " : " ", id); } PERF_MARK("post_render"); - return DBOX_STATUS_ERROR_NONE; + return ret; } PUBLIC int dynamicbox_buffer_stride(dynamicbox_buffer_h handle)