Skip to content

Commit

Permalink
final 0.44
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
  • Loading branch information
philippedeswert committed Jun 29, 2011
1 parent 0e93eb3 commit ead7c4a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion debian/changelog
@@ -1,6 +1,8 @@
usb-moded (0.44) unstable; urgency=low

* Make disconnect debouncing timeout longer for USB cert Fixes: NB#266884
* Delay mode cleanup together with module cleanup for USB cert Fixes: NB#266884
* Check if there was a previous cable connection before sending disconnect signal.
As otherwise we send spurious disconnects when dedicated charger is disconnected.

-- Philippe De Swert <philippe.de-swert@nokia.com> Thu, 23 Jun 2011 12:03:58 +0300

Expand Down
5 changes: 4 additions & 1 deletion src/usb_moded-udev.c
Expand Up @@ -152,6 +152,7 @@ void hwal_cleanup(void)
static void udev_parse(struct udev_device *dev)
{
const char *tmp;
static int cable = 0; /* track if cable was connected as we cannot distinguish charger and cable disconnects */

tmp = udev_device_get_property_value(dev, "POWER_SUPPLY_ONLINE");
if(!tmp)
Expand Down Expand Up @@ -180,12 +181,14 @@ static void udev_parse(struct udev_device *dev)
if(!strcmp(tmp, "USB")||!strcmp(tmp, "USB_CDP"))
{
log_debug("UDEV:USB cable connected\n");
cable = 1;
set_usb_connected(TRUE);
}
}
else
else if(cable)
{
log_debug("UDEV:USB cable disconnected\n");
set_usb_connected(FALSE);
cable = 0;
}
}
2 changes: 1 addition & 1 deletion src/usb_moded.c
Expand Up @@ -129,7 +129,7 @@ static gboolean set_disconnected(gpointer data)
usb_moded_send_signal(USB_DISCONNECTED);
#ifdef NOKIA
/* delayed clean-up of state */
timeout_source = g_timeout_add_seconds(5, usb_cleanup_timeout, NULL);
timeout_source = g_timeout_add_seconds(3, usb_cleanup_timeout, NULL);
#else
/* unload modules and general cleanup */
usb_moded_mode_cleanup(get_usb_module());
Expand Down

0 comments on commit ead7c4a

Please sign in to comment.