Bug in SDP example?
Hello guys,
I've been tracing a bug in part of Tadas work (obex-data-server), and I finally found it, it was related to sdp records calls, the dbus interface specifies to use array of byte, while he was using array of int. So I replacedDBUS_TYPE_G_UINT_ARRAY for DBUS_TYPE_G_UCHAR_ARRAY, and valgrind stopped blaming about bugs.
Strange is that the example at this page:
http://wiki.bluez.org/wiki/HOWTO/DiscoveringServices
Seems to have exactly the same problem in the D-Bus glib example. The D-Bus function call that has an error is this one:dbus_g_proxy_call (adapter_proxy, "GetRemoteServiceRecord", &error,G_TYPE_STRING, address,G_TYPE_UINT, *((guint32 *)handle_array->data), G_TYPE_INVALID,DBUS_TYPE_G_UINT_ARRAY, &record_array,G_TYPE_INVALID)
I'm not 100% sure, but I've been through both hcid and sdpd sources from the latest bluez libs and seems like I'm right. It should say:DBUS_TYPE_G_UCHAR_ARRAY, &record_array,
Instead of:DBUS_TYPE_G_UINT_ARRAY, &record_array,
Any of the gurus out there can confirm this? I don't want to fix the example if it's all ready all right.
Thanks,
Manuel Naranjo
Wireless Cables Inc. www.aircable.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
PATCH 1/1 fixes CancelCall
Hi Johan/Fredric,
This patch fixes CancelCall .
Let me know if anything needs to be changed.
-Alok.
Index: audio/headset.c
===================================================================
RCS file: /cvsroot/bluez/utils/audio/headset.c,v
retrieving revision 1.163
headset.c +10 -0
@@ -1270,10 +1270,11 @@ static DBusHandlerResult hs_cancel_ringi void *data) {struct device *device = data;struct headset *hs = device->headset;DBusMessage *reply =NULL ; +int err;if (hs->state <HEADSET_STATE_CONNECTED )return error_not_connected (conn, msg); reply =dbus_message_new_method_return (msg);
@@ -1287,10 +1288,19 @@ static DBusHandlerResult hs_cancel_ringig_source_remove (hs->ring_timer); hs->ring_timer =0 ; done: +if (hs->hfp_active) { +/*+CIEV: (callsetup = 0)*/ + err =headset_send (hs,"\r\n+CIEV:3, 0\r\n" ); +if (err <0 ) { +dbus_message_unref (reply); +return error_failed_errno (conn, msg, -err); + } + } +send_message_and_unref (conn, reply);return DBUS_HANDLER_RESULT_HANDLED ; }
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel