diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-17 20:34:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-17 20:34:16 +0000 |
commit | db9c68c76d7a9eb3f200df9d0fcaf971387cb061 (patch) | |
tree | ed3f7aafb2c5b026cf6f1415fee437ff301250af /src/transport/gnunet-helper-transport-bluetooth.c | |
parent | a1c356b49e7718828bf9473825a8f92db8353a4e (diff) | |
download | gnunet-db9c68c76d7a9eb3f200df9d0fcaf971387cb061.tar.gz gnunet-db9c68c76d7a9eb3f200df9d0fcaf971387cb061.zip |
-fix channel data range to make -1 legal value
Diffstat (limited to 'src/transport/gnunet-helper-transport-bluetooth.c')
-rw-r--r-- | src/transport/gnunet-helper-transport-bluetooth.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c index 2d1b67dfe..b5556c7d6 100644 --- a/src/transport/gnunet-helper-transport-bluetooth.c +++ b/src/transport/gnunet-helper-transport-bluetooth.c | |||
@@ -965,7 +965,7 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len) | |||
965 | sdp_list_t *search_list = 0, *attrid_list = 0, *response_list = 0, *it = 0; | 965 | sdp_list_t *search_list = 0, *attrid_list = 0, *response_list = 0, *it = 0; |
966 | uuid_t svc_uuid; | 966 | uuid_t svc_uuid; |
967 | uint32_t range = 0x0000ffff; | 967 | uint32_t range = 0x0000ffff; |
968 | uint8_t channel = -1; | 968 | int channel = -1; |
969 | 969 | ||
970 | /* Connect to the local SDP server */ | 970 | /* Connect to the local SDP server */ |
971 | session = sdp_connect (BDADDR_ANY, &dest, 0); | 971 | session = sdp_connect (BDADDR_ANY, &dest, 0); |
@@ -1002,9 +1002,12 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len) | |||
1002 | 1002 | ||
1003 | sdp_close (session); | 1003 | sdp_close (session); |
1004 | 1004 | ||
1005 | if (channel == -1) | 1005 | if (-1 == channel) |
1006 | fprintf (stderr, "Failed to find the listening channel for interface `%.*s': %s\n", | 1006 | fprintf (stderr, |
1007 | IFNAMSIZ, dev->iface, strerror (errno)); | 1007 | "Failed to find the listening channel for interface `%.*s': %s\n", |
1008 | IFNAMSIZ, | ||
1009 | dev->iface, | ||
1010 | strerror (errno)); | ||
1008 | 1011 | ||
1009 | return channel; | 1012 | return channel; |
1010 | } | 1013 | } |