@@ 28,7 28,7 @@
#include <gio/gio.h>
static bool running = false;
-static uint32_t id;
+static uint32_t id = 0;
static void (*callback)(uint32_t id, const char* app_name, const char* summary, const char* body) = NULL;
static void dbus_method_call(GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer data) {
@@ 46,11 46,10 @@ static void dbus_method_call(GDBusConnec
g_variant_get(parameters, "(&su&s&s&sasa{sv}i)", &app_name, &replaces_id, &app_icon, &summary, &body, &actions, &hints, &expire_timeout);
g_variant_iter_free(actions);
- ++id;
if(callback != NULL) {
callback(id, app_name, summary, body);
}
- GVariant* ret = g_variant_new("(u)", id);
+ GVariant* ret = g_variant_new("(u)", id++);
g_dbus_method_invocation_return_value(invocation, ret);
} else if(strcmp(method_name, "GetCapabilities") == 0) {
GVariantBuilder* builder = g_variant_builder_new(G_VARIANT_TYPE("as"));