array of string

Julien PUYDT julien.puydt at laposte.net
Fri Oct 28 22:45:52 PDT 2005


yohann (yrc) coppel a écrit :
> The argument size (Int32) works fine, but the two others no... (so
> segfault in the for)
> 
> I've found this code:
> http://cvs.gnome.org/viewcvs/NetworkManager/test/nm-tool.c?rev=1.2&view=markup
> 
> in the function detail_device, the author do the same.... and it
> works ?!

1) are you sure to use the data from the message *before* you 
dbus_message_unref it (which makes said data invalid) ?
2) you really should put the i = 0 as first position in the for: that 
will make your code more readable
3) why ++i and not i++ ?
4) why not directly printf ("%d : %s\n", i, list[i]) ?
5) why flushing 1. explicitly and 2. in the middle of a debug print 
statement !?

Hope this helps,

Snark on #gnomemeeting


More information about the dbus mailing list