diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2016-06-29 22:12:24 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2016-07-05 10:55:55 +0200 |
commit | 8b297e2f4ef935b700e1111c595e7777c577c480 (patch) | |
tree | a1ad188bb82f77d655e7e46aff3de6e529350aac /src/mbimcli | |
parent | 9e252aa20a89ad880f134b2cbd00553ad5dba8a2 (diff) | |
download | libmbim-aleksander/att.tar.gz |
mbimcli: allow incomplete servicesaleksander/att
Where we know the service UUID but not the meaning of each CID yet
Diffstat (limited to 'src/mbimcli')
-rw-r--r-- | src/mbimcli/mbimcli-basic-connect.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mbimcli/mbimcli-basic-connect.c b/src/mbimcli/mbimcli-basic-connect.c index e1d40d1..efa5a64 100644 --- a/src/mbimcli/mbimcli-basic-connect.c +++ b/src/mbimcli/mbimcli-basic-connect.c @@ -570,14 +570,19 @@ query_device_services_ready (MbimDevice *device, cids = g_string_new (""); for (j = 0; j < device_services[i]->cids_count; j++) { - if (service == MBIM_SERVICE_INVALID) { + const gchar *cid_printable = NULL; + + if (service != MBIM_SERVICE_INVALID) + cid_printable = mbim_cid_get_printable (service, device_services[i]->cids[j]); + + if (!cid_printable) { g_string_append_printf (cids, "%u", device_services[i]->cids[j]); if (j < device_services[i]->cids_count - 1) g_string_append (cids, ", "); } else { g_string_append_printf (cids, "%s%s (%u)", j == 0 ? "" : "\t\t ", - mbim_cid_get_printable (service, device_services[i]->cids[j]), + cid_printable, device_services[i]->cids[j]); if (j < device_services[i]->cids_count - 1) g_string_append (cids, ",\n"); |