patch for irmc bluetooth on linuxppc
Nathan Hand <nathanh-+sEm3Uyhuxm6c6uEtOJ/[email protected]> Fri, 13 May 2005 00:07:15 +1000
| Newsgroups | gmane.comp.gnome.apps.multisync.devel |
|---|---|
| Message-ID | <1115906285.12126.13.camel@localhost> |
--=-A/DHbad2LJLh61OTTvAC Content-Type: text/plain Content-Transfer-Encoding: 7bit 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. 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. --=-A/DHbad2LJLh61OTTvAC Content-Disposition: attachment; filename=irmc-sdp-inquiry-endian.diff Content-Type: text/x-patch; name=irmc-sdp-inquiry-endian.diff; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 LS0tIHBsdWdpbnMvaXJtY19zeW5jL3NyYy9pcm1jX2JsdWV0b290aC5jLm9yaWcJMjAwNS0wNS0x MiAyMzo0MDo1NC4wMDAwMDAwMDAgKzEwMDANCisrKyBwbHVnaW5zL2lybWNfc3luYy9zcmMvaXJt Y19ibHVldG9vdGguYwkyMDA1LTA1LTEyIDIzOjQxOjI1LjAwMDAwMDAwMCArMTAwMA0KQEAgLTkw LDEwICs5MCwxMCBAQA0KIEdMaXN0ICpmaW5kX2J0X3VuaXRzKCkgew0KICAgR0xpc3QgKnVuaXRs aXN0ID0gTlVMTDsNCiAgIGlucXVpcnlfaW5mbyBpaVsxMF07DQotICBpbnQgbnVtZm91bmQgPSAw Ow0KLSAgaWYgKCFzZHBfZ2VuZXJhbF9pbnF1aXJ5KGlpLCAxMCwgMTAwMDAsICh1aW50OF90Kikm bnVtZm91bmQpKSB7DQorICB1aW50OF90IG51bWZvdW5kID0gMDsNCisgIGlmICghc2RwX2dlbmVy YWxfaW5xdWlyeShpaSwgMTAsIDEwMDAwLCAmbnVtZm91bmQpKSB7DQogICAgIGludCB0Ow0KLSAg ICBmb3IgKHQgPSAwOyB0IDwgbnVtZm91bmQ7IHQrKykgew0KKyAgICBmb3IgKHQgPSAwOyB0IDwg KGludCkgbnVtZm91bmQ7IHQrKykgew0KICAgICAgIGJkYWRkcl90IHRtcDsNCiAgICAgICBpbnQg cmV0cmllcyA9IDM7DQogICAgICAgaXJtY19idF91bml0ICppcmJ0ID0gZ19tYWxsb2MwKHNpemVv Zihpcm1jX2J0X3VuaXQpKTsNCg== --=-A/DHbad2LJLh61OTTvAC-- ------------------------------------------------------- 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