summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2015-12-19 14:07:10 +0100
committerAleksander Morgado <aleksander@aleksander.es>2015-12-19 14:09:03 +0100
commit138b3dabc23f7e56adccbd76c42d9136af5b4329 (patch)
treeabf3b4bf7851a70aa64cff70c969214cc44d592a
parent9123c7bd93c8ca4f8fc3cc45d105946c4517dbb2 (diff)
downloadModemManager-138b3dabc23f7e56adccbd76c42d9136af5b4329.tar.gz
cli: validate SUPL server before showing it
-rw-r--r--cli/mmcli-modem-location.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/mmcli-modem-location.c b/cli/mmcli-modem-location.c
index 539f8bcf7..3425789fe 100644
--- a/cli/mmcli-modem-location.c
+++ b/cli/mmcli-modem-location.c
@@ -301,10 +301,14 @@ print_location_status (void)
mm_modem_location_signals_location (ctx->modem_location) ? "yes" : "no");
/* If A-GPS supported, show SUPL server setup */
- if (mm_modem_location_get_capabilities (ctx->modem_location) & MM_MODEM_LOCATION_SOURCE_AGPS)
+ if (mm_modem_location_get_capabilities (ctx->modem_location) & MM_MODEM_LOCATION_SOURCE_AGPS) {
+ const gchar *supl_server;
+
+ supl_server = mm_modem_location_get_supl_server (ctx->modem_location);
g_print (" ----------------------------\n"
" A-GPS | SUPL server: '%s'\n",
- mm_modem_location_get_supl_server (ctx->modem_location));
+ supl_server ? supl_server : "unset");
+ }
/* If GPS supported, show GPS refresh rate */
if (mm_modem_location_get_capabilities (ctx->modem_location) & (MM_MODEM_LOCATION_SOURCE_GPS_RAW |