~ubuntu-branches/ubuntu/lucid/bluez/lucid

« back to all changes in this revision

Viewing changes to input/device.c

  • Committer: Bazaar Package Importer
  • Author(s): Baptiste Mille-Mathias
  • Date: 2009-05-13 10:32:23 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090513103223-b0v1iorzpl1bf4ib
Tags: 4.39-0ubuntu1
* New upstream release (LP: #372428)
  - Add workaround for dealing with unknown inquiry complete. 
  - Fix discovering when using software scheduler. 
  - Fix wrong NoInputNoOutput IO capability string. 
  - Fix race condition with agent during pairing. 
  - Fix agent cancellation for security mode 3 acceptor failure. 
  - Fix temporary flag removal when device creation fails. 
  - Fix hciattach to use ppoll instead of poll. 
  - Fix service class update when adapter is down. 
  - Fix service classes race condition during startup. 
  - Fix release of audio client before freeing the device.
* debian/rules:
  - remove "--enable-hal" to DEB_CONFIGURE_EXTRA_FLAGS. This is not a
  supported flag.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
 
154
154
static void input_device_free(struct input_device *idev)
155
155
{
 
156
        if (idev->dc_id)
 
157
                device_remove_disconnect_watch(idev->device, idev->dc_id);
 
158
 
156
159
        dbus_connection_unref(idev->conn);
157
160
        btd_device_unref(idev->device);
158
161
        g_free(idev->name);
424
427
                                "Connected", DBUS_TYPE_BOOLEAN, &connected);
425
428
 
426
429
        device_remove_disconnect_watch(idev->device, idev->dc_id);
 
430
        idev->dc_id = 0;
427
431
 
428
432
        iconn->intr_watch = 0;
429
433
 
777
781
        return connection_disconnect(iconn, flags);
778
782
}
779
783
 
780
 
static void disconnect_cb(struct btd_device *device, void *user_data)
 
784
static void disconnect_cb(struct btd_device *device, gboolean removal,
 
785
                                void *user_data)
781
786
{
782
787
        struct input_device *idev = user_data;
 
788
        int flags;
783
789
 
784
790
        info("Input: disconnect %s", idev->path);
785
791
 
786
 
        disconnect(idev, 0);
 
792
        flags = removal ? (1 << HIDP_VIRTUAL_CABLE_UNPLUG) : 0;
 
793
 
 
794
        disconnect(idev, flags);
787
795
}
788
796
 
789
797
static int input_device_connected(struct input_device *idev,
1003
1011
        debug("Unregistered interface %s on path %s", INPUT_DEVICE_INTERFACE,
1004
1012
                                                                idev->path);
1005
1013
 
1006
 
        /* Disconnect if applied */
1007
 
        disconnect(idev, (1 << HIDP_VIRTUAL_CABLE_UNPLUG));
1008
1014
        devices = g_slist_remove(devices, idev);
1009
1015
        input_device_free(idev);
1010
1016
}