patch-src_obex_socket_c 897 B

123456789101112131415161718192021
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- ussp-push-0.11.orig/src/obex_socket.c 2008-08-24 22:48:53.000000000 +0200
  3. +++ ussp-push-0.11/src/obex_socket.c 2008-10-16 11:08:10.000000000 +0200
  4. @@ -197,7 +197,7 @@ static int bt_sock_name2bth(int devid, c
  5. for (i = 0; i < niinf; i++) {
  6. char devname[128];
  7. - if (hci_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1,
  8. + if (hci_read_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1,
  9. devname, 100000) >= 0) {
  10. if (strcasecmp(devname, btname) == 0) {
  11. *btaddr = piinf[i].bdaddr;
  12. @@ -297,7 +297,7 @@ static int cobex_init(struct cobex_conte
  13. gt->wfd = gt->rfd;
  14. tcgetattr(gt->rfd, &gt->oldtio);
  15. - bzero(&gt->newtio, sizeof(struct termios));
  16. + memset(&gt->newtio, 0, sizeof(struct termios));
  17. gt->newtio.c_cflag = B115200 | CS8 | CREAD;
  18. gt->newtio.c_iflag = IGNPAR;
  19. gt->newtio.c_oflag = 0;