summary refs log tree commit diff stats
path: root/src/common/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/dbus')
-rw-r--r--src/common/dbus/dbus-client.c4
-rw-r--r--src/common/dbus/dbus-plugin.c5
-rw-r--r--src/common/dbus/example.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/common/dbus/dbus-client.c b/src/common/dbus/dbus-client.c
index e507883d..bbbe10e8 100644
--- a/src/common/dbus/dbus-client.c
+++ b/src/common/dbus/dbus-client.c
@@ -19,6 +19,8 @@
  * xclaesse@gmail.com
  */
 
+#include "config.h"
+
 #define GLIB_DISABLE_DEPRECATION_WARNINGS
 #include <dbus/dbus-glib.h>
 #include "dbus-client.h"
@@ -91,7 +93,7 @@ hexchat_remote (void)
 	g_object_unref (dbus);
 
 	if (!hexchat_running) {
-		//dbus_g_connection_unref (connection);
+		/* dbus_g_connection_unref (connection); */
 		return;
 	}
 
diff --git a/src/common/dbus/dbus-plugin.c b/src/common/dbus/dbus-plugin.c
index ee8accfe..1afd9ef0 100644
--- a/src/common/dbus/dbus-plugin.c
+++ b/src/common/dbus/dbus-plugin.c
@@ -26,6 +26,7 @@
 #include <dbus/dbus-glib-lowlevel.h>
 #include <glib/gi18n.h>
 #include "hexchat-plugin.h"
+#include "dbus-plugin.h"
 
 #define PNAME _("remote access")
 #define PDESC _("plugin for remote access using DBUS")
@@ -365,6 +366,7 @@ remote_object_connect (RemoteObject *obj,
 	static guint count = 0;
 	char *sender, *path;
 	RemoteObject *remote_object;
+	gchar count_buffer[15];
 	
 	sender = dbus_g_method_get_sender (context);
 	remote_object = g_hash_table_lookup (clients, sender);
@@ -373,7 +375,8 @@ remote_object_connect (RemoteObject *obj,
 		g_free (sender);
 		return TRUE;
 	}
-	path = g_build_filename (DBUS_OBJECT_PATH, count++, NULL);
+	g_snprintf(count_buffer, sizeof(count_buffer), "%u", count++);
+	path = g_build_filename (DBUS_OBJECT_PATH, count_buffer, NULL);
 	remote_object = g_object_new (REMOTE_TYPE_OBJECT, NULL);
 	remote_object->dbus_path = path;
 	remote_object->filename = g_path_get_basename (filename);
diff --git a/src/common/dbus/example.c b/src/common/dbus/example.c
index c3ad4ff3..0228b884 100644
--- a/src/common/dbus/example.c
+++ b/src/common/dbus/example.c
@@ -33,7 +33,7 @@ guint command_id;
 guint server_id;
 
 static void
-write_error (char *message,
+write_error (const char *message,
 	     GError **error)
 {
 	if (error == NULL || *error == NULL) {