diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-12-27 11:23:41 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:38 +0100 |
commit | 6cdc6a4f731b0b9afe959bc10bc7386ff6735607 (patch) | |
tree | a548b382085541d81e9ea506a49696bad6a78007 /cli/mmcli-bearer.c | |
parent | fe7f71b67753a471b8119ccc5cad28d6ec8bf1f0 (diff) |
cli: use the new properties handler object in bearer
Diffstat (limited to 'cli/mmcli-bearer.c')
-rw-r--r-- | cli/mmcli-bearer.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c index 9330ea2c..4015de39 100644 --- a/cli/mmcli-bearer.c +++ b/cli/mmcli-bearer.c @@ -139,7 +139,7 @@ print_bearer_info (MMBearer *bearer) { const MMBearerIpConfig *ipv4_config; const MMBearerIpConfig *ipv6_config; - const MMBearerProperties *properties; + MMBearerProperties *properties; ipv4_config = mm_bearer_get_ipv4_config (bearer); ipv6_config = mm_bearer_get_ipv6_config (bearer); @@ -162,19 +162,22 @@ print_bearer_info (MMBearer *bearer) mm_bearer_get_suspended (bearer) ? "yes" : "no", VALIDATE_UNKNOWN (mm_bearer_get_interface (bearer))); - g_print (" -------------------------\n" - " Properties | apn: '%s'\n" - " | roaming: '%s'\n" - " | IP type: '%s'\n" - " | user: '%s'\n" - " | password: '%s'\n" - " | number: '%s'\n", - VALIDATE_NONE (mm_bearer_properties_get_apn (properties)), - mm_bearer_properties_get_allow_roaming (properties) ? "allowed" : "forbidden", - VALIDATE_NONE (mm_bearer_properties_get_ip_type (properties)), - VALIDATE_NONE (mm_bearer_properties_get_user (properties)), - VALIDATE_NONE (mm_bearer_properties_get_password (properties)), - VALIDATE_NONE (mm_bearer_properties_get_number (properties))); + if (properties) { + g_print (" -------------------------\n" + " Properties | apn: '%s'\n" + " | roaming: '%s'\n" + " | IP type: '%s'\n" + " | user: '%s'\n" + " | password: '%s'\n" + " | number: '%s'\n", + VALIDATE_NONE (mm_bearer_properties_get_apn (properties)), + mm_bearer_properties_get_allow_roaming (properties) ? "allowed" : "forbidden", + VALIDATE_NONE (mm_bearer_properties_get_ip_type (properties)), + VALIDATE_NONE (mm_bearer_properties_get_user (properties)), + VALIDATE_NONE (mm_bearer_properties_get_password (properties)), + VALIDATE_NONE (mm_bearer_properties_get_number (properties))); + g_object_unref (properties); + } /* IPv4 */ g_print (" -------------------------\n" |