Hello there, so after some further debugging with George, we found out the problem that made File transfers and stream tubes crash. It looks like dbus-glib is sending u instead of q, due to the fact that it is not capable of sending q, hence the struct as received by QtDBus is (su).
QtDBus demarshaller is extremely strict, hence the struct is not demarshalled
correctly. Changing the spec to use u instead of q, hence generating an uint
instead of an ushort into SocketAddressIPv{4,6}, fixes the problem.
On a side note, I'd propose to change this in Telepathy spec itself, given
that as wjt confirmed, u is always used instead of q in some places, and it
might lead to similar situations.
--
-------------------
Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
From 93777916acb4d69c7fb63702372768bb84f5f53a Mon Sep 17 00:00:00 2001 From: Dario Freddi <[email protected]> Date: Sun, 2 May 2010 12:23:58 +0200 Subject: [PATCH] Change the spec to u instead of q for socket address types. It turns out dbus-glib can't send q, hence the received struct is (su). Since QtDBus' demarshaller is very strict, demarshalling a (su) into a (sq) oddly fails. This patch fixes the problem, which lead to a crash in every code path returning a socket address (FileTransfer, StreamTube...). --- spec/generic-types.xml | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/generic-types.xml b/spec/generic-types.xml index d4dce15..daec677 100644 --- a/spec/generic-types.xml +++ b/spec/generic-types.xml @@ -110,7 +110,7 @@ as for <tp:type>Socket_Address_IPv6</tp:type>. </tp:docstring> </tp:member> - <tp:member type="q" name="Port"> + <tp:member type="u" name="Port"> <tp:docstring>The TCP or UDP port number.</tp:docstring> </tp:member> </tp:struct> @@ -122,7 +122,7 @@ numbers, each between 0 and 255 inclusive, e.g. "192.168.0.1".</tp:docstring> </tp:member> - <tp:member type="q" name="Port"> + <tp:member type="u" name="Port"> <tp:docstring>The TCP or UDP port number.</tp:docstring> </tp:member> </tp:struct> @@ -133,7 +133,7 @@ <tp:docstring>An IPv6 address literal as specified by RFC2373 section 2.2, e.g. "2001:DB8::8:800:200C:4171".</tp:docstring> </tp:member> - <tp:member type="q" name="Port"> + <tp:member type="u" name="Port"> <tp:docstring>The TCP or UDP port number.</tp:docstring> </tp:member> </tp:struct> -- 1.7.1
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ telepathy mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/telepathy
