aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-bearer.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-12-21 15:15:28 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:36 +0100
commit73ca5dcb24c131d3e3a99a89dcd6f1329c9d90f4 (patch)
treef4e92a1a3e8130bac2b31d0a26ede2a087cd2c21 /cli/mmcli-bearer.c
parent8fc2050e768157076dfa5445d52541904602e832 (diff)
cli: don't recheck group options if already done
Diffstat (limited to 'cli/mmcli-bearer.c')
-rw-r--r--cli/mmcli-bearer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c
index 5fe50fab..9330ea2c 100644
--- a/cli/mmcli-bearer.c
+++ b/cli/mmcli-bearer.c
@@ -83,7 +83,11 @@ mmcli_bearer_get_option_group (void)
gboolean
mmcli_bearer_options_enabled (void)
{
- guint n_actions;
+ static guint n_actions = 0;
+ static gboolean checked = FALSE;
+
+ if (checked)
+ return !!n_actions;
n_actions = (!!connect_with_number_str +
connect_flag +
@@ -103,6 +107,7 @@ mmcli_bearer_options_enabled (void)
if (info_flag)
mmcli_force_sync_operation ();
+ checked = TRUE;
return !!n_actions;
}