Commit 45df8078 authored by phdeswer's avatar phdeswer

finalize disconnect/undefined signalling fix

Signed-off-by: phdeswer's avatarPhilippe De Swert <philippedeswert@gmail.com>
parent 215b7f59
usb-moded (0.45) unstable; urgency=low
* Send disconnect signal only after clean-up has been done.
* Only signal MODE_UNDEFINED when we have actually done all the modesetting handling
after disconnect. Fixes: NB#273204
* Actually use cdrom timeout
-- Philippe De Swert <philippe.de-swert@nokia.com> Wed, 13 Jul 2011 14:45:42 +0300
......
......@@ -267,7 +267,6 @@ void check_module_state(const char *module_name)
#ifdef NOKIA
gboolean usb_cleanup_timeout(gpointer data)
{
usb_moded_send_signal(USB_DISCONNECTED);
usb_moded_mode_cleanup(get_usb_module());
usb_moded_module_cleanup(get_usb_module());
set_usb_mode(MODE_UNDEFINED);
......
......@@ -130,12 +130,12 @@ static gboolean set_disconnected(gpointer data)
if(!get_usb_connection_state())
{
log_debug("usb disconnected\n");
/* signal usb disconnected */
usb_moded_send_signal(USB_DISCONNECTED);
#ifdef NOKIA
/* delayed clean-up of state */
timeout_source = g_timeout_add_seconds(3, usb_cleanup_timeout, NULL);
#else
/* signal usb disconnected */
usb_moded_send_signal(USB_DISCONNECTED);
/* unload modules and general cleanup */
usb_moded_mode_cleanup(get_usb_module());
usb_moded_module_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