Commit ead7c4ac authored by phdeswer's avatar phdeswer

final 0.44

Signed-off-by: phdeswer's avatarPhilippe De Swert <philippedeswert@gmail.com>
parent 0e93eb37
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
......
......@@ -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)
......@@ -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;
}
}
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment