cli: don't recheck group options if already done

This commit is contained in:
Aleksander Morgado
2011-12-21 15:15:28 +01:00
parent 8fc2050e76
commit 73ca5dcb24
3 changed files with 18 additions and 3 deletions

View File

@@ -108,7 +108,11 @@ mmcli_modem_get_option_group (void)
gboolean
mmcli_modem_options_enabled (void)
{
guint n_actions;
static guint n_actions = 0;
static gboolean checked = FALSE;
if (checked)
return !!n_actions;
n_actions = (monitor_state_flag +
enable_flag +
@@ -136,6 +140,7 @@ mmcli_modem_options_enabled (void)
if (info_flag)
mmcli_force_sync_operation ();
checked = TRUE;
return !!n_actions;
}