mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 23:32:14 +02:00
manager: rename suspend_source to suspend_timer
This makes its role more explicit.
This commit is contained in:
@@ -126,9 +126,9 @@ void modem_reset(struct EG25Manager *manager)
|
||||
if (manager->reset_timer)
|
||||
return;
|
||||
|
||||
if (manager->suspend_source) {
|
||||
g_source_remove(manager->suspend_source);
|
||||
manager->suspend_source = 0;
|
||||
if (manager->suspend_timer) {
|
||||
g_source_remove(manager->suspend_timer);
|
||||
manager->suspend_timer = 0;
|
||||
}
|
||||
|
||||
manager->modem_state = EG25_STATE_RESETTING;
|
||||
|
@@ -43,7 +43,7 @@ struct EG25Manager {
|
||||
|
||||
GDBusProxy *suspend_proxy;
|
||||
int suspend_inhibit_fd;
|
||||
guint suspend_source;
|
||||
guint suspend_timer;
|
||||
|
||||
GUdevClient *udev;
|
||||
|
||||
|
@@ -35,9 +35,9 @@ static void add_modem(struct EG25Manager *manager, GDBusObject *object)
|
||||
g_assert(manager->mm_modem != NULL);
|
||||
|
||||
if (manager->modem_state == EG25_STATE_RESUMING) {
|
||||
if (manager->suspend_source) {
|
||||
g_source_remove(manager->suspend_source);
|
||||
manager->suspend_source = 0;
|
||||
if (manager->suspend_timer) {
|
||||
g_source_remove(manager->suspend_timer);
|
||||
manager->suspend_timer = 0;
|
||||
}
|
||||
modem_resume_post(manager);
|
||||
manager->modem_state = EG25_STATE_CONFIGURED;
|
||||
|
@@ -20,7 +20,7 @@
|
||||
static gboolean check_modem_resume(struct EG25Manager *manager)
|
||||
{
|
||||
g_message("Modem wasn't probed in time, restart it!");
|
||||
manager->suspend_source = 0;
|
||||
manager->suspend_timer = 0;
|
||||
modem_reset(manager);
|
||||
|
||||
return FALSE;
|
||||
@@ -100,7 +100,7 @@ static void signal_cb(GDBusProxy *proxy,
|
||||
take_inhibitor(manager);
|
||||
modem_resume_pre(manager);
|
||||
manager->modem_state = EG25_STATE_RESUMING;
|
||||
manager->suspend_source = g_timeout_add_seconds(9, G_SOURCE_FUNC(check_modem_resume), manager);
|
||||
manager->suspend_timer = g_timeout_add_seconds(9, G_SOURCE_FUNC(check_modem_resume), manager);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,9 +158,9 @@ void suspend_init(struct EG25Manager *manager)
|
||||
void suspend_destroy(struct EG25Manager *manager)
|
||||
{
|
||||
drop_inhibitor(manager);
|
||||
if (manager->suspend_source) {
|
||||
g_source_remove(manager->suspend_source);
|
||||
manager->suspend_source = 0;
|
||||
if (manager->suspend_timer) {
|
||||
g_source_remove(manager->suspend_timer);
|
||||
manager->suspend_timer = 0;
|
||||
}
|
||||
if (manager->suspend_proxy) {
|
||||
g_object_unref(manager->suspend_proxy);
|
||||
|
Reference in New Issue
Block a user