Diff between 1da4a66054272a628c08907be257a115016a29ae and 18ffa5c18bc6a2e73f23bcf6b9656854890206c2

Changed Files

File Additions Deletions Status
attrib/gattrib.c +2 -2 modified

Full Patch

diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index 0f011f0..00f59d7 100644
--- a/attrib/gattrib.c
+++ b/attrib/gattrib.c
@@ -50,7 +50,6 @@ struct _GAttrib {
 	GQueue *responses;
 	GSList *events;
 	guint next_cmd_id;
-	guint next_evt_id;
 	GDestroyNotify destroy;
 	gpointer destroy_user_data;
 	gboolean stale;
@@ -644,6 +643,7 @@ guint g_attrib_register(GAttrib *attrib, guint8 opcode,
 				GAttribNotifyFunc func, gpointer user_data,
 				GDestroyNotify notify)
 {
+	static guint next_evt_id = 0;
 	struct event *event;
 
 	event = g_try_new0(struct event, 1);
@@ -654,7 +654,7 @@ guint g_attrib_register(GAttrib *attrib, guint8 opcode,
 	event->func = func;
 	event->user_data = user_data;
 	event->notify = notify;
-	event->id = ++attrib->next_evt_id;
+	event->id = ++next_evt_id;
 
 	attrib->events = g_slist_append(attrib->events, event);