Reply half-received ?

John (J5) Palmieri johnp at redhat.com
Thu Oct 27 10:37:15 PDT 2005


In send_get_current_song you have an error where you send a NULL which
is wrong.  The Bus has no concept of NULL and can not send one:


char* path = 0;

dbus_message_append_args (message,
                        DBUS_TYPE_INVALID,
                        DBUS_TYPE_STRING, &path,
                        DBUS_TYPE_INVALID);


On Thu, 2005-10-27 at 10:43 -0500, yohann (yrc) coppel wrote:
> Hi!
> 
> Ok, now i'm using ubuntu.. very nice :-)
> 
> But my problem still exist :-( the version is:
> $ dbus-daemon --version
> D-BUS Message Bus Daemon 0.36.2
> 
> (so, not exactly the last one...)
> 
> I attach the two files: dbus_server.c and dbus_client.c
> All dbus operations are in theses two files.
> The client function that call for the song is send_get_current_song line
> 106 in dbus_client.c
> 
> And the one of the server who try to answer is
> handle_get_current_song(DBusMessage *message) line 151 of dbus_server.c
> 
> There may be something that I don't understand... i don't know why this
> happens...
> 
> Just to remember:
> execution of the server:
> unknown message received: NameAcquired
> unknown message received: NameAcquired
> get_current_song
> Hey... Here is a job for me! reply sent: Hello World
> 
> and the client:
> >>> (null)
> 
> Thanks a lot for all this help!
> 
> Yohann.
> 
> P.S. I realy sent 4 times the same message, or is-it my evolution who
> becomes crazy ???
> 
> Le mercredi 26 octobre 2005 à 10:11 -0400, Havoc Pennington a écrit :
> > On Wed, 2005-10-26 at 00:40 -0500, yrc wrote:
> > > 
> > > unknown message received: ServiceAcquired
> > 
> > Is this an old version of dbus? Should be NameAcquired instead.
> > 
> > In older versions plain "v_STRING" was correct, not "&v_STRING"
> > 
> > > unknown message received: Disconnected
> > 
> > Disconnect happens if a message is invalid for some reason. If you turn
> > on DBUS_VERBOSE=1 then you can probably diagnose why it was invalid.
> > Possible reasons are missing mandatory fields or invalid encoding in
> > strings, for example.
> > 
> > Recent versions are more likely to print warnings about invalid things
> > on the side that's trying to send the invalid message, because we added
> > more checks.
> > 
> > Havoc
> > 
> > 
-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list