diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2012-05-15 19:16:46 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-05-16 10:57:19 +0300 |
commit | e9248d560483f8a6376915b3192be5c70427271c (patch) | |
tree | 197fb316807f87ad65ffd95c259abc51d3fb3985 /client/bluetooth.c | |
parent | 96967bb79b0f89b3649547d07201ea71295b6214 (diff) | |
download | obexd-e9248d560483f8a6376915b3192be5c70427271c.tar.gz |
client: Fix not checking if GoepL2capPsm contains a valid PSM
In case the PSM is not valid ignore it so we are still able to connect
to RFCOMM.
Diffstat (limited to 'client/bluetooth.c')
-rw-r--r-- | client/bluetooth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/bluetooth.c b/client/bluetooth.c index b49a82e..56f80fe 100644 --- a/client/bluetooth.c +++ b/client/bluetooth.c @@ -261,7 +261,8 @@ static void search_callback(uint8_t type, uint16_t status, } data = sdp_data_get(rec, 0x0200); - if (data != NULL) + /* PSM must be odd and lsb of upper byte must be 0 */ + if (data != NULL && (data->val.uint16 & 0x0101) == 0x0001) ch = data->val.uint16; sdp_record_free(rec); |