Reply half-received ?

yrc yohann at varyoh.com
Tue Oct 25 22:40:24 PDT 2005


Thanks !

For the second question, it's ok, they were NameAcquired, as you said.

But, for the first problem, a very strange thing appears:
So now, my function is:

	printf("Hey... Here is a job for me! ");
	DBusMessage *reply;

	reply = dbus_message_new_method_return(message);
	
	const char *v_STRING;
	v_STRING = "Hello World";
	
	dbus_message_append_args (reply,
			DBUS_TYPE_STRING, &v_STRING,
			DBUS_TYPE_INVALID);

	dbus_connection_send (bus_conn, reply, NULL);
	dbus_message_unref (reply);
	dbus_connection_flush (bus_conn);
	printf("reply sent.\n");

and the result:

unknown message received: ServiceAcquired
unknown message received: ServiceAcquired
get_current_song
Hey... Here is a job for me! reply sent.
unknown message received: Disconnected

I didn't change anything else in the client....

and the client, of course....:

Failed to get current song: Message did not receive a reply (timeout by
message bus)

very strange.....



Le mardi 25 octobre 2005 à 23:31 -0400, John (J5) Palmieri a écrit :
> On Tue, 2005-10-25 at 21:58 -0500, yrc wrote:
> 
> > 
> > So, two questions:
> > As you can see, the server receive the method call, because wee can see
> > "Hey...". and it seems to answer to it since the client receive an
> > answer (no timeout or another error...), but the "Hello World" is not
> > set to path (that's why i said half-received ;-) )! what i'm doing
> > wrong?
> 
> I think Havoc was right on this one.
> 
> > This was the first question; and the second one:
> > Why do my server receive two messages when I run it, even without any
> > client.... Maybe you will need more code for this.... or does it
> > happends each time?
> > 
> 
> I'm thinking they are both NameAcquired signals.  First for the
> connections to the bus when it sends the Hello() message and gets a
> unique name and then when you request the bus name (in your case
> VNAP_DBUS_SERVICE).  You can always call dbus_message_get_member on your
> message to get the name of the method or signal being invoked.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051026/474ffaad/attachment.pgp


More information about the dbus mailing list