aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjhtop.kim <jhtop.kim@samsung.com>2011-08-02 13:41:23 +0900
committerJaikumar Ganesh <jaikumar@google.com>2011-08-04 10:54:14 -0700
commit8bbc3fa4c0456c39c4174ab4be4bf39efe0de091 (patch)
treefeacc3dd1dc9f4e501aa76a929687958cbc70db5
parent492a85adb19817e840967b052d9dc02e6fb34aac (diff)
downloadbluez-8bbc3fa4c0456c39c4174ab4be4bf39efe0de091.tar.gz
Fix for Pin or key missing rfcomm socket error
If cancel is pressed on the pin request dialog (for non SSP case), auth request continues in a loop. Add additional checks for the auth agent. This is a gross temporary hack till we move to the mgmt interface. Change-Id: I565a75698cb4fa1c2ed8c93ed6198b05a1a7b8af
-rwxr-xr-x[-rw-r--r--]src/device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index 8805c27b..87286449 100644..100755
--- a/src/device.c
+++ b/src/device.c
@@ -2146,10 +2146,12 @@ void device_bonding_complete(struct btd_device *device, uint8_t status)
if (auth && auth->type == AUTH_TYPE_NOTIFY && auth->agent)
agent_cancel(auth->agent);
- if (status == 0x06) {
+ // Temporary hack till we move to mgmt interface.
+ if (status == 0x06 && auth == NULL) {
device_remove_bonding(device);
device_get_address(device, &bdaddr);
btd_adapter_retry_authentication(device->adapter, &bdaddr);
+ return;
} else if (status) {
device_cancel_authentication(device, TRUE);
device_cancel_bonding(device, status);