context: add test-no-suspend-resume cli parameter
Disables suspend/resume support at runtime. This is useful for modems which are never turned off or suspended when the host suspends.
This commit is contained in:

committed by
Aleksander Morgado

parent
12329ac788
commit
7159b8e27a
10
src/main.c
10
src/main.c
@@ -195,9 +195,13 @@ main (int argc, char *argv[])
|
||||
{
|
||||
MMSleepMonitor *sleep_monitor;
|
||||
|
||||
sleep_monitor = mm_sleep_monitor_get ();
|
||||
g_signal_connect (sleep_monitor, MM_SLEEP_MONITOR_SLEEPING, G_CALLBACK (sleeping_cb), NULL);
|
||||
g_signal_connect (sleep_monitor, MM_SLEEP_MONITOR_RESUMING, G_CALLBACK (resuming_cb), NULL);
|
||||
if (mm_context_get_test_no_suspend_resume())
|
||||
mm_dbg ("Suspend/resume support disabled at runtime");
|
||||
else {
|
||||
sleep_monitor = mm_sleep_monitor_get ();
|
||||
g_signal_connect (sleep_monitor, MM_SLEEP_MONITOR_SLEEPING, G_CALLBACK (sleeping_cb), NULL);
|
||||
g_signal_connect (sleep_monitor, MM_SLEEP_MONITOR_RESUMING, G_CALLBACK (resuming_cb), NULL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user