When Buxton daemon is terminated unexpectedly, a daemon or an application using
vconf-buxton API can fall into infinite loop.
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
Change-Id: Ib65f6224e0645db2c765bbcaa51166763c7fcf62
result = buxton_client_handle_response (_buxton_ ());
if (result < 0)
ERR ("Error in buxton_client_handle_response: %m");
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;
if (lock)
UNLOCK (buxton);
return result;
static gboolean
_cb_glib_ (GIOChannel * src, GIOCondition cond, gpointer data)
{
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;
}
return G_SOURCE_CONTINUE;
}