Merge "Workaround for infinite loop issue" into tizen accepted/tizen_3.0.2014.q4_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common accepted/tizen/3.0.2014.q4/common/20150226.102758 accepted/tizen/common/20150225.131232 accepted/tizen/mobile/20150226.013523 accepted/tizen/tv/20150226.011256 accepted/tizen/wearable/20150226.012649 submit/tizen/20150225.094523 submit/tizen_3.0.2014.q4_common/20150226.095150
authorSuchang Woo <suchang.woo@samsung.com>
Wed, 25 Feb 2015 09:42:02 +0000 (01:42 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 25 Feb 2015 09:42:02 +0000 (01:42 -0800)
src/vconf-buxton.c

index 3d9b196..ea6a232 100644 (file)
@@ -528,6 +528,10 @@ _handle_buxton_response_ (int lock)
   result = buxton_client_handle_response (_buxton_ ());
   if (result < 0)
     ERR ("Error in buxton_client_handle_response: %m");
+  if (result == 0) {
+    ERR ("Connection closed");
+    result = -1;
+  }
   if (lock)
     UNLOCK (buxton);
   return result;
@@ -1153,7 +1157,13 @@ _notify_reg_unreg_ (struct notify *notif, bool reg)
 static gboolean
 _cb_glib_ (GIOChannel * src, GIOCondition cond, gpointer data)
 {
-  _handle_buxton_response_ (1);
+  int status;
+
+  status = _handle_buxton_response_ (1);
+  if (status < 0) {
+    glib_source = NULL;
+    return G_SOURCE_REMOVE;
+  }
   return G_SOURCE_CONTINUE;
 }