GNOME Bugzilla – Bug 372454
gnome-obex-send: unable to initialize OBEX client source
Last modified: 2006-11-08 14:51:13 UTC
hi I unable to send file using gnome-obex-send $ gnome-obex-send test.txt Browsing 00:12:37:DF:85:11 ... Service Name: OBEX Object Push Service Description: OBEX Object Push Service Provider: /a/mobile/cl.gif Service RecHandle: 0x10008 Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 8 "OBEX" (0x0008) Service Class ID List: "OBEX Object Push" (0x1105) ** Message: device 00:12:37:DF:85:11 (OBEX Object Push) port 8 ** (gnome-obex-send:8445): CRITICAL **: btctl_obexclient_source_new: assertion `channel <= 0' failed ** (gnome-obex-send:8445): WARNING **: Unable to initialize OBEX client source I think the cause is the following patch http://cvs.gnome.org/viewcvs/libbtctl/src/obex-client-source.c?r1=1.6&r2=1.7&diff_format=h - if (! bdaddr) { - g_warning ("Null bdaddr passed"); - return NULL; - } - - if (channel <= 0) { - g_warning ("Channel less than 1"); - return NULL; - } + g_return_val_if_fail (bdaddr != NULL, NULL); + g_return_val_if_fail (channel <= 0, NULL); I think the second one should be g_return_val_if_fail (channel > 0, NULL); because from the doc g_return_val_if_fail(): If the expression evaluates to FALSE, a critical message is logged and val is returned.
You're completely right, it's the wrong way around.
2006-11-08 Bastien Nocera <hadess@hadess.net> * configure.in: 0.8.2 * src/obex-client-source.c: (btctl_obexclient_source_new): Fix one of the the sanity checks being the wrong way around, spotted by Arif Lukito (Closes: #372454) * NEWS: upd