Index: audio/headset.c =================================================================== RCS file: /cvsroot/bluez/utils/audio/headset.c,v retrieving revision 1.156 diff -u -5 -p -r1.156 headset.c --- audio/headset.c 9 Jan 2008 12:36:58 -0000 1.156 +++ audio/headset.c 10 Jan 2008 14:43:36 -0000 @@ -752,10 +752,16 @@ static void get_record_reply(DBusPending || (uuid.type == SDP_UUID16 && uuid.value.uuid16 != id)) { error("Service classes did not contain the expected UUID"); goto failed_not_supported; } + if ((uuid.value.uuid32 == HANDSFREE_SVCLASS_ID) + || (uuid.value.uuid16 == HANDSFREE_SVCLASS_ID)) { + hs->hfp_handle = record->handle; + }else + hs->hsp_handle = record->handle; + if (!sdp_get_access_protos(record, &protos)) { ch = sdp_get_proto_port(protos, RFCOMM_UUID); sdp_list_foreach(protos, (sdp_list_func_t) sdp_list_free, NULL); sdp_list_free(protos, NULL);