diff options
author | Ben Chan <benchan@chromium.org> | 2013-11-21 22:24:50 -0800 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-11-22 08:35:53 +0100 |
commit | 6d251daf4716c34587bf11826b7f798c54fda5ff (patch) | |
tree | be4acf575119034fd8265fdaa5de2a7c6f765a0e /cli/mmcli-modem.c | |
parent | e4382212586447f63004db0fdd7df78243da582a (diff) |
cli: print 'Bearers' property in Modem interface
Diffstat (limited to 'cli/mmcli-modem.c')
-rw-r--r-- | cli/mmcli-modem.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c index dbec796f..a365663e 100644 --- a/cli/mmcli-modem.c +++ b/cli/mmcli-modem.c @@ -266,6 +266,7 @@ print_modem_info (void) MMUnlockRetries *unlock_retries; guint signal_quality = 0; gboolean signal_quality_recent = FALSE; + gchar *bearer_paths_string; /* Not the best thing to do, as we may be doing _get() calls twice, but * easiest to maintain */ @@ -351,6 +352,15 @@ print_modem_info (void) /* Get signal quality info */ signal_quality = mm_modem_get_signal_quality (ctx->modem, &signal_quality_recent); + if (mm_modem_get_bearer_paths (ctx->modem)) { + bearer_paths_string = g_strjoinv (", ", (gchar **)mm_modem_get_bearer_paths (ctx->modem)); + if (!bearer_paths_string[0]) { + g_free (bearer_paths_string); + bearer_paths_string = NULL; + } + } else + bearer_paths_string = NULL; + /* Global IDs */ g_print ("\n" "%s (device id '%s')\n", @@ -500,6 +510,12 @@ print_modem_info (void) VALIDATE_PATH (mm_modem_get_sim_path (ctx->modem))); g_print ("\n"); + /* Bearers */ + g_print (" -------------------------\n" + " Bearers | paths: '%s'\n", + VALIDATE_PATH (bearer_paths_string)); + g_print ("\n"); + g_free (ports_string); g_free (supported_ip_families_string); g_free (current_bands_string); @@ -514,6 +530,7 @@ print_modem_info (void) g_free (unlock_retries_string); g_free (own_numbers_string); g_free (drivers_string); + g_free (bearer_paths_string); } static void |