Hi, On Mon, Mar 9, 2009 at 11:32 AM, Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx> wrote: > Hi Bastien, > > On Mon, Mar 9, 2009 at 11:14 AM, Bastien Nocera <hadess@xxxxxxxxxx> wrote: >> Both use the code in common/sdp-xml.[ch] and convert_sdp_record_to_xml() >> in particular, which is why it makes no sense to me... >> >> I double-checked by adding some debug to convert_raw_data_to_xml() and >> the string for the attribute I'm interested in is empty, so it must be a >> problem parsing the raw data from the device, or there's something that >> strips this value somewhere in bluetoothd... > > Then I fear that my code of dumping an sdp record (sdp_copy_record) is > probably not copying the string correctly. That is exactly what is causing the problem, sdp_copy_record detects the size of string with strlen (libs/sdp.c:511), which probably will return 0 as the string seems to start with \0, so we probably need some special handling for this. Btw, this is not really a problem of sdp_copy_record but sdp_data_alloc, so there a high chance that we may fix other bugs related to this. -- Luiz Augusto von Dentz Engenheiro de Computação -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html