On Thu, 2005-05-12 at 16:19 +0200, Armin Bauer wrote: > > Nathan Hand wrote: > > This code in irmc_bluetooth.c isn't endian safe. On a PowerPC it was > > searching over 16 million devices on the piconet. > > > > 94 if (!sdp_general_inquiry(ii, 10, 10000, (uint8_t*)&numfound)) > > (gdb) next > > ... > > (gdb) print numfound > > $25 = 16777216. > > > > The search effectively never finishes and the list remains empty. > > > > Simple patch fixes the problem. Search now correctly detects my Sony > > T360 using LinuxPPC. Syncing with Evolution works beaut. > > > > Thanks for your patch! > > > One last point, after adding the patch I notice that numfound is not > > equal to 1 but is equal to '1' (aka 0x31). > > > > (gdb) print numfound > > $1 = 49 '1' > > > > Maybe that's a libbluetooth bug? Anyway, doesn't hurt, it takes mere > > seconds to scan through 48 non-existent devices. > > > > Maybe it just always returns the result of this inquiry as a string so > we should do a atoi to get the correct integer... i think we should > check this before commiting the patch since i would consider 48 false > scans a pretty bad bug.
I must have read gdb incorrectly. I put this line in irmc_bluetooth.c and rebuilt the plugin. if (!sdp_general_inquiry(ii, 10, 10000, (uint8_t*)&numfound)) { int t; printf("the value of numfound = %d\n", (int)(numfound)); And the output looks perfectly cromulent. the value of numfound = 1 The endian problem is still valid and needs the patch posted earlier. ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ Multisync-devel mailing list Multisync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/multisync-devel