dundee: disconnect bluetooth link in case dial fails
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 13 Aug 2012 21:52:06 +0000 (18:52 -0300)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Fri, 17 Aug 2012 12:59:50 +0000 (14:59 +0200)
If the ATD*99# dial fails for some reason, NO CARRIER, for example, we
need to disconnect the bluetooth link and do further clean up on
disconnect_callback().

dundee/device.c

index e921a2a..e5f6424 100644 (file)
@@ -385,6 +385,8 @@ err:
        __ofono_dbus_pending_reply(&device->pending,
                                __dundee_error_failed(device->pending));
        device->pending = NULL;
+
+       device->driver->disconnect(device, disconnect_callback, device);
 }
 
 static int device_dial_setup(struct dundee_device *device, int fd)