array of string
yohann (yrc) coppel
yohann at varyoh.com
Sat Oct 29 08:42:33 PDT 2005
Le samedi 29 octobre 2005 à 07:45 +0200, Julien PUYDT a écrit :
> 1) are you sure to use the data from the message *before* you
> dbus_message_unref it (which makes said data invalid) ?
well.. yes :-( at least for "reply". (see my attached code)
> 2) you really should put the i = 0 as first position in the for: that
> will make your code more readable
More or less old C-style... sory... I have to change my mind... ;-)
> 3) why ++i and not i++ ?
i always do like that.. I'v read that its a little little+ bit more
quick at the execution because the compiler doesn't need one more
register, but ok, i'm sure that thecompiler can transform i++ to ++i for
me in this very simple situation.
> 4) why not directly printf ("%d : %s\n", i, list[i]) ?
To know _exactly_ where is the segfault quickly... before using gdb...
> 5) why flushing 1. explicitly and 2. in the middle of a debug print
> statement !?
But for 2, 4 and 5, it's just statements to *debug*, i don't wana let it
in the final code.... I just write one line, then try... doesn't works,
change something, try again... etc... so after 5-6 hours of coding
(debugging...) my code looks like that, really dirty, i know... sory :-)
So, finaly, it doesn't works....
I attach the two complete functions if someone can help me more...
Regards,
yrc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: send.c
Type: text/x-csrc
Size: 1259 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051029/4459f779/send.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.c
Type: text/x-csrc
Size: 591 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051029/4459f779/server.c
More information about the dbus
mailing list