Attached are patch to gg2.spec and new gg2-dbus.patch. Several comments on
upgrade to version 2.2.8:
1. It seems that gg2-erasms.patch was already applied to gnugadu sources.
2. gg2-dbus.patch is basically a copy of the old one but only with relevant
parts (no moving variables around).
3. I have no idea about dbus so I would like this functionality to be checked
before applying. But if the previous patch worked fine this should as well.
4. In this version annoying crash was fixed (and that's why I did the
upgrade).
--
Regards,
Tomasz Grobelny
diff -u -r gg2-2.2.8.orig/src/plugins/dbus/dbus_plugin.c gg2-2.2.8/src/plugins/dbus/dbus_plugin.c
--- gg2-2.2.8.orig/src/plugins/dbus/dbus_plugin.c 2005-01-10 10:39:11.000000000 +0100
+++ gg2-2.2.8/src/plugins/dbus/dbus_plugin.c 2005-09-18 00:11:48.000000000 +0200
@@ -79,6 +79,7 @@
{
DBusMessage *return_message;
GGaduContact *k = NULL;
+ const gchar *arg_empty = "";
return_message = dbus_message_new_method_return(message);
@@ -106,14 +107,23 @@
/* not sure about this g_strdup() */
status_descr = k->status_descr ? g_strdup(k->status_descr) : "";
-
- dbus_message_append_args(return_message, DBUS_TYPE_STRING, return_status, DBUS_TYPE_STRING, status_descr,DBUS_TYPE_STRING, "", DBUS_TYPE_INVALID);
+
+ dbus_message_append_args(return_message,
+ DBUS_TYPE_STRING, &return_status,
+ DBUS_TYPE_STRING, &status_descr,
+ DBUS_TYPE_STRING, &arg_empty,
+ DBUS_TYPE_INVALID);
GGaduContact_free(k);
}
else
{
+ const gchar *arg_unknown = "Unknown";
print_debug("NOT FOUND: Unknown");
- dbus_message_append_args(return_message, DBUS_TYPE_STRING, "Unknown", DBUS_TYPE_STRING, "",DBUS_TYPE_STRING, "", DBUS_TYPE_INVALID);
+ dbus_message_append_args(return_message,
+ DBUS_TYPE_STRING, &arg_unknown,
+ DBUS_TYPE_STRING, &arg_empty,
+ DBUS_TYPE_STRING, &arg_empty,
+ DBUS_TYPE_INVALID);
}
/* I can free here because signal return copy of GGaduContact */
dbus_connection_send(connection, return_message, NULL);
@@ -121,7 +131,6 @@
}
plugins = plugins->next;
}
- dbus_free(contactURI);
g_strfreev(URItab);
g_free(contactURIhandler);
}
@@ -154,7 +163,7 @@
if (p)
{
print_debug("proto: %s", p->protocol_uri);
- dbus_message_append_args(return_message, DBUS_TYPE_STRING, p->protocol_uri, DBUS_TYPE_INVALID);
++ dbus_message_append_args(return_message, DBUS_TYPE_STRING, &p->protocol_uri, DBUS_TYPE_INVALID);
}
index = ggadu_repo_value_next("_protocols_", REPO_VALUE_PROTOCOL, &key, index);
@@ -224,10 +233,9 @@
}
g_strfreev(URItab);
g_free(contactURIhandler);
- dbus_free(contactURI);
}
- dbus_message_append_args(return_message, DBUS_TYPE_BOOLEAN, ret, DBUS_TYPE_INVALID);
+ dbus_message_append_args(return_message, DBUS_TYPE_BOOLEAN, &ret, DBUS_TYPE_INVALID);
dbus_connection_send(connection, return_message, NULL);
dbus_message_unref(return_message);
dbus_error_free(&error);
@@ -247,7 +255,7 @@
dbus_message_get_path(message), dbus_message_get_interface(message), dbus_message_get_type(message));
- if (dbus_message_is_signal(message, DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL, "Disconnected"))
+ if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected"))
{
print_debug("dbus signal: Disconnected");
return DBUS_HANDLER_RESULT_HANDLED;
@@ -305,7 +313,7 @@
dbus_connection_setup_with_g_main(bus, g_main_loop_get_context(config->main_loop));
dbus_error_init(&derror);
- dbus_bus_acquire_service(bus, DBUS_ORG_FREEDESKTOP_IM_SERVICE, 0, &derror);
+ dbus_bus_request_name(bus, DBUS_ORG_FREEDESKTOP_IM_SERVICE, 0, &derror);
if (dbus_error_is_set(&derror))
{
g_warning("DBUS: Failed to acquire IM service. %s", derror.message);
Index: gg2.spec
===================================================================
RCS file: /cvsroot/SPECS/gg2.spec,v
retrieving revision 1.146
diff -u -3 -p -r1.146 gg2.spec
--- gg2.spec 4 Sep 2005 15:27:04 -0000 1.146
+++ gg2.spec 17 Sep 2005 22:32:50 -0000
@@ -12,17 +12,16 @@ Summary: GNU Gadu 2 - free talking
Summary(es): GNU Gadu 2 - charlar libremente
Summary(pl): GNU Gadu 2 - wolne gadanie
Name: gg2
-Version: 2.2.7
-Release: 2
+Version: 2.2.8
+Release: 1
Epoch: 3
License: GPL v2+
Group: Applications/Communications
Source0: http://dl.sourceforge.net/ggadu/%{name}-%{version}.tar.gz
-# Source0-md5: 6e00cad44bef228e395c24a2a90da99c
+# Source0-md5: d2d81ba30b54748d453e662d911ab227
URL: http://www.gnugadu.org/
Patch0: %{name}-desktop.patch
Patch1: %{name}-dbus.patch
-Patch2: %{name}-erasms.patch
%{?with_arts:BuildRequires: artsc-devel}
%{?with_gtkspell:BuildRequires: aspell-devel}
BuildRequires: autoconf
@@ -411,7 +410,6 @@ Motywy graficzne dla GUI GNU Gadu 2.
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%build
%{__gettextize}
_______________________________________________
pld-devel-en mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en