Skip to content

Commit

Permalink
mode and module cleanup is NOT the same.
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe De Swert <phdeswer@lumi.maa>
  • Loading branch information
Philippe De Swert committed Jun 28, 2011
1 parent a42afb2 commit 0e93eb3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/usb_moded-modules.c
Expand Up @@ -34,6 +34,9 @@
#include "usb_moded-dbus.h"
#include "usb_moded-dbus-private.h"
#include "usb_moded-config.h"
#ifdef NOKIA
#include "usb_moded-modesetting.h"
#endif

/** load module
*
Expand Down Expand Up @@ -261,8 +264,9 @@ void check_module_state(const char *module_name)


#ifdef NOKIA
gboolean usb_module_timeout_cleanup(gpointer data)
gboolean usb_cleanup_timeout(gpointer data)
{
usb_moded_mode_cleanup(get_usb_module());
usb_moded_module_cleanup(get_usb_module());
return FALSE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/usb_moded-modules.h
Expand Up @@ -53,5 +53,5 @@ void check_module_state(const char *module_name);

#ifdef NOKIA
/* handler for a cleanup after a timeout */
gboolean usb_module_timeout_cleanup(gpointer data);
gboolean usb_cleanup_timeout(gpointer data);
#endif /* NOKIA */
3 changes: 2 additions & 1 deletion src/usb_moded.c
Expand Up @@ -129,9 +129,10 @@ 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_module_timeout_cleanup, NULL);
timeout_source = g_timeout_add_seconds(5, usb_cleanup_timeout, NULL);
#else
/* unload modules and general cleanup */
usb_moded_mode_cleanup(get_usb_module());
usb_moded_module_cleanup(get_usb_module());
#endif /* NOKIA */

Expand Down

0 comments on commit 0e93eb3

Please sign in to comment.