1 diff -u -r gg2-2.2.8.orig/src/plugins/dbus/dbus_plugin.c gg2-2.2.8/src/plugins/dbus/dbus_plugin.c
2 --- gg2-2.2.8.orig/src/plugins/dbus/dbus_plugin.c 2005-01-10 10:39:11.000000000 +0100
3 +++ gg2-2.2.8/src/plugins/dbus/dbus_plugin.c 2005-09-18 00:11:48.000000000 +0200
6 DBusMessage *return_message;
7 GGaduContact *k = NULL;
8 + const gchar *arg_empty = "";
10 return_message = dbus_message_new_method_return(message);
14 /* not sure about this g_strdup() */
15 status_descr = k->status_descr ? g_strdup(k->status_descr) : "";
17 - dbus_message_append_args(return_message, DBUS_TYPE_STRING, return_status, DBUS_TYPE_STRING, status_descr,DBUS_TYPE_STRING, "", DBUS_TYPE_INVALID);
19 + dbus_message_append_args(return_message,
20 + DBUS_TYPE_STRING, &return_status,
21 + DBUS_TYPE_STRING, &status_descr,
22 + DBUS_TYPE_STRING, &arg_empty,
28 + const gchar *arg_unknown = "Unknown";
29 print_debug("NOT FOUND: Unknown");
30 - dbus_message_append_args(return_message, DBUS_TYPE_STRING, "Unknown", DBUS_TYPE_STRING, "",DBUS_TYPE_STRING, "", DBUS_TYPE_INVALID);
31 + dbus_message_append_args(return_message,
32 + DBUS_TYPE_STRING, &arg_unknown,
33 + DBUS_TYPE_STRING, &arg_empty,
34 + DBUS_TYPE_STRING, &arg_empty,
37 /* I can free here because signal return copy of GGaduContact */
38 dbus_connection_send(connection, return_message, NULL);
41 plugins = plugins->next;
43 - dbus_free(contactURI);
45 g_free(contactURIhandler);
50 print_debug("proto: %s", p->protocol_uri);
51 - dbus_message_append_args(return_message, DBUS_TYPE_STRING, p->protocol_uri, DBUS_TYPE_INVALID);
52 + dbus_message_append_args(return_message, DBUS_TYPE_STRING, &p->protocol_uri, DBUS_TYPE_INVALID);
55 index = ggadu_repo_value_next("_protocols_", REPO_VALUE_PROTOCOL, &key, index);
59 g_free(contactURIhandler);
60 - dbus_free(contactURI);
63 - dbus_message_append_args(return_message, DBUS_TYPE_BOOLEAN, ret, DBUS_TYPE_INVALID);
64 + dbus_message_append_args(return_message, DBUS_TYPE_BOOLEAN, &ret, DBUS_TYPE_INVALID);
65 dbus_connection_send(connection, return_message, NULL);
66 dbus_message_unref(return_message);
67 dbus_error_free(&error);
69 dbus_message_get_path(message), dbus_message_get_interface(message), dbus_message_get_type(message));
72 - if (dbus_message_is_signal(message, DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL, "Disconnected"))
73 + if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected"))
75 print_debug("dbus signal: Disconnected");
76 return DBUS_HANDLER_RESULT_HANDLED;
78 dbus_connection_setup_with_g_main(bus, g_main_loop_get_context(config->main_loop));
80 dbus_error_init(&derror);
81 - dbus_bus_acquire_service(bus, DBUS_ORG_FREEDESKTOP_IM_SERVICE, 0, &derror);
82 + dbus_bus_request_name(bus, DBUS_ORG_FREEDESKTOP_IM_SERVICE, 0, &derror);
83 if (dbus_error_is_set(&derror))
85 g_warning("DBUS: Failed to acquire IM service. %s", derror.message);