When accepting a 1-1 D-Bus tube (so without muc) AcceptDBusTube returns NULL instead of the address of the D-Bus server.
See FIXME in tubes-channel.c for details.
A workaround is to call GetDBusTubeAddress() to get the address of the D-Bus server after the signal TubeStateChanged is received with the state Tube_State_Open.
yeah that works.
Actually I'm wondering if AcceptDBusTube shouldn't return anything and user have to wait for tube opening to get its address. Don't know.
I agree: AcceptDBusTube shouldn't return the address.
I opened a bug on telepathy-spec: Bug #15454.
The spec does not need to change. I have a fix for Gabble:
+/* There is two step to enable receiving a D-Bus connection from the local
+ * application:
+ * - listen on the socket
+ * - add the socket in the mainloop
+ * We need to know the socket path to return from the AcceptDBusTube D-Bus
+ * call but the socket in the mainloop must be added only when we are ready
+ * to receive connections, that is when the bytestream is fully open with the
+ * remote contact.
Fixed in 0.7.12