[Goodies-commits] r1843 - in verve-plugin/trunk: . scripts

Jannis Pohlmann jannis at xfce.org
Thu Aug 3 11:56:21 CEST 2006


Author: jannis
Date: 2006-08-03 09:56:20 +0000 (Thu, 03 Aug 2006)
New Revision: 1843

Modified:
   verve-plugin/trunk/ChangeLog
   verve-plugin/trunk/scripts/verve-focus.c
Log:
	* scripts/verve-focus.c: Fix segfault caused by a DBusError
	  pointer not being initialized (bug #2113).

Modified: verve-plugin/trunk/ChangeLog
===================================================================
--- verve-plugin/trunk/ChangeLog	2006-08-03 01:47:29 UTC (rev 1842)
+++ verve-plugin/trunk/ChangeLog	2006-08-03 09:56:20 UTC (rev 1843)
@@ -1,5 +1,10 @@
 2006-08-02	Jannis Pohlmann <jannis at xfce.org>
 
+	* scripts/verve-focus.c: Fix segfault caused by a DBusError
+	  pointer not being initialized (bug #2113).
+
+2006-08-02	Jannis Pohlmann <jannis at xfce.org>
+
 	* README: Add optional D-BUS dependency.
 
 2006-08-02	Jannis Pohlmann <jannis at xfce.org>

Modified: verve-plugin/trunk/scripts/verve-focus.c
===================================================================
--- verve-plugin/trunk/scripts/verve-focus.c	2006-08-03 01:47:29 UTC (rev 1842)
+++ verve-plugin/trunk/scripts/verve-focus.c	2006-08-03 09:56:20 UTC (rev 1843)
@@ -42,17 +42,17 @@
   DBusConnection *connection;
   DBusMessage    *method;
   DBusMessage    *result;
-  DBusError      *error;
+  DBusError       error;
   gint            exit_status;
 
   /* Configure gettext */
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
 
   /* Initialize error structure */
-  dbus_error_init (error);
+  dbus_error_init (&error);
 
   /* Connect to the session bus */
-  connection = dbus_bus_get (DBUS_BUS_SESSION, error);
+  connection = dbus_bus_get (DBUS_BUS_SESSION, &error);
 
   /* Print error if connection failed */
   if (G_UNLIKELY (connection == NULL))
@@ -61,7 +61,7 @@
       g_error (_("Failed to connect to the D-BUS session bus."));
 
       /* Free error structure */
-      dbus_error_free (error);
+      dbus_error_free (&error);
 
       /* Exit with error code */
       return EXIT_FAILURE;
@@ -71,7 +71,7 @@
   method = dbus_message_new_method_call ("org.xfce.Verve", "/org/xfce/RunDialog", "org.xfce.Verve", "GrabFocus");
 
   /* Send message and wait for reply */
-  result = dbus_connection_send_with_reply_and_block (connection, method, 5000, error);
+  result = dbus_connection_send_with_reply_and_block (connection, method, 5000, &error);
 
   /* Destroy sent message */
   dbus_message_unref (method);
@@ -83,7 +83,7 @@
       g_debug (_("Failed to deliver the org.xfce.Verve#GrabFocus method."));
 
       /* Free error structure */
-      dbus_error_free (error);
+      dbus_error_free (&error);
 
       /* Set exit status */
       exit_status = EXIT_FAILURE;




More information about the Goodies-commits mailing list