Diff between 6184bc59116330f866fd2bfb476f892054fc4e25 and eb41b504d014f30aae18a1505fafe024a127f603

Changed Files

File Additions Deletions Status
attrib/gattrib.c +3 -1 modified
attrib/gattrib.h +1 -0 modified
src/attrib-server.c +1 -1 modified

Full Patch

diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index 8c15e52..4d901f1 100644
--- a/attrib/gattrib.c
+++ b/attrib/gattrib.c
@@ -346,7 +346,9 @@ static gboolean received_data(GIOChannel *io, GIOCondition cond, gpointer data)
 		struct event *evt = l->data;
 
 		if (evt->expected == buf[0] ||
-					evt->expected == GATTRIB_ALL_EVENTS)
+				evt->expected == GATTRIB_ALL_EVENTS ||
+				(is_response(buf[0]) == FALSE &&
+						evt->expected == GATTRIB_ALL_REQS))
 			evt->func(buf, len, evt->user_data);
 	}
 
diff --git a/attrib/gattrib.h b/attrib/gattrib.h
index 4c49879..47c0d60 100644
--- a/attrib/gattrib.h
+++ b/attrib/gattrib.h
@@ -29,6 +29,7 @@ extern "C" {
 #endif
 
 #define GATTRIB_ALL_EVENTS 0xFF
+#define GATTRIB_ALL_REQS 0xFE
 
 struct _GAttrib;
 typedef struct _GAttrib GAttrib;
diff --git a/src/attrib-server.c b/src/attrib-server.c
index 260e64a..5c46e6d 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -954,7 +954,7 @@ int attrib_channel_attach(GAttrib *attrib, gboolean out)
 
 
 	channel->attrib = g_attrib_ref(attrib);
-	channel->id = g_attrib_register(channel->attrib, GATTRIB_ALL_EVENTS,
+	channel->id = g_attrib_register(channel->attrib, GATTRIB_ALL_REQS,
 					channel_handler, channel, NULL);
 
 	if (out == FALSE)