Skip to content

Commit

Permalink
add mode change to undefined on disconnect at the right time
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 Jul 15, 2011
1 parent e47996d commit 215b7f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/usb_moded-modules.c
Expand Up @@ -36,6 +36,7 @@
#include "usb_moded-config.h"
#ifdef NOKIA
#include "usb_moded-modesetting.h"
#include "usb_moded-modes.h"
#endif

/** load module
Expand Down Expand Up @@ -269,6 +270,7 @@ 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);
return FALSE;
}
#endif /* NOKIA */
Expand Down
2 changes: 1 addition & 1 deletion src/usb_moded.c
Expand Up @@ -139,9 +139,9 @@ static gboolean set_disconnected(gpointer data)
/* unload modules and general cleanup */
usb_moded_mode_cleanup(get_usb_module());
usb_moded_module_cleanup(get_usb_module());
set_usb_mode(MODE_UNDEFINED);
#endif /* NOKIA */

set_usb_mode(MODE_UNDEFINED);
}
return FALSE;
}
Expand Down

0 comments on commit 215b7f5

Please sign in to comment.