cli,modem: print PCO as 'n/a' if not available
This commit is contained in:
@@ -461,7 +461,7 @@ print_modem_info (void)
|
|||||||
/* If available, 3GPP related stuff */
|
/* If available, 3GPP related stuff */
|
||||||
if (ctx->modem_3gpp) {
|
if (ctx->modem_3gpp) {
|
||||||
gchar *facility_locks;
|
gchar *facility_locks;
|
||||||
GList *pco_list, *l;
|
GList *pco_list;
|
||||||
|
|
||||||
facility_locks = (mm_modem_3gpp_facility_build_string_from_mask (
|
facility_locks = (mm_modem_3gpp_facility_build_string_from_mask (
|
||||||
mm_modem_3gpp_get_enabled_facility_locks (ctx->modem_3gpp)));
|
mm_modem_3gpp_get_enabled_facility_locks (ctx->modem_3gpp)));
|
||||||
@@ -473,8 +473,7 @@ print_modem_info (void)
|
|||||||
" | operator name: '%s'\n"
|
" | operator name: '%s'\n"
|
||||||
" | subscription: '%s'\n"
|
" | subscription: '%s'\n"
|
||||||
" | registration: '%s'\n"
|
" | registration: '%s'\n"
|
||||||
" | EPS UE mode: '%s'\n"
|
" | EPS UE mode: '%s'\n",
|
||||||
" | PCO:\n",
|
|
||||||
VALIDATE_UNKNOWN (mm_modem_3gpp_get_imei (ctx->modem_3gpp)),
|
VALIDATE_UNKNOWN (mm_modem_3gpp_get_imei (ctx->modem_3gpp)),
|
||||||
facility_locks,
|
facility_locks,
|
||||||
VALIDATE_UNKNOWN (mm_modem_3gpp_get_operator_code (ctx->modem_3gpp)),
|
VALIDATE_UNKNOWN (mm_modem_3gpp_get_operator_code (ctx->modem_3gpp)),
|
||||||
@@ -486,6 +485,10 @@ print_modem_info (void)
|
|||||||
mm_modem_3gpp_eps_ue_mode_operation_get_string (
|
mm_modem_3gpp_eps_ue_mode_operation_get_string (
|
||||||
mm_modem_3gpp_get_eps_ue_mode_operation (ctx->modem_3gpp)));
|
mm_modem_3gpp_get_eps_ue_mode_operation (ctx->modem_3gpp)));
|
||||||
|
|
||||||
|
if (pco_list) {
|
||||||
|
GList *l;
|
||||||
|
|
||||||
|
g_print (" | PCO:\n");
|
||||||
for (l = pco_list; l; l = g_list_next (l)) {
|
for (l = pco_list; l; l = g_list_next (l)) {
|
||||||
MMPco *pco = MM_PCO (l->data);
|
MMPco *pco = MM_PCO (l->data);
|
||||||
gchar *pco_data_hex = NULL;
|
gchar *pco_data_hex = NULL;
|
||||||
@@ -502,9 +505,11 @@ print_modem_info (void)
|
|||||||
pco_data_hex ? pco_data_hex : "");
|
pco_data_hex ? pco_data_hex : "");
|
||||||
g_free (pco_data_hex);
|
g_free (pco_data_hex);
|
||||||
}
|
}
|
||||||
|
mm_pco_list_free (pco_list);
|
||||||
|
} else
|
||||||
|
g_print (" | PCO: 'n/a'\n");
|
||||||
|
|
||||||
g_free (facility_locks);
|
g_free (facility_locks);
|
||||||
mm_pco_list_free (pco_list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If available, CDMA related stuff */
|
/* If available, CDMA related stuff */
|
||||||
|
Reference in New Issue
Block a user