summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNagi Marupaka <nmarupaka@google.com>2023-05-13 07:18:48 +0000
committerAleksander Morgado <aleksandermj@chromium.org>2023-05-17 09:43:11 +0000
commitd95114a576adbe56e0611e8c1f0b2908d274c52c (patch)
treedabeb422a6dad48f571b9bf842b2a84119e7b324
parenteeba2ff32b83f96a2f8889962689b47870f6f8a6 (diff)
downloadModemManager-d95114a576adbe56e0611e8c1f0b2908d274c52c.tar.gz
modem-helpers-mbim: allow optional outputs in mm_signal_from_mbim_signal_state()
Fixes 470dff235c70683928ab0eb39c64151a8a4ceb7c
-rw-r--r--src/mm-modem-helpers-mbim.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mm-modem-helpers-mbim.c b/src/mm-modem-helpers-mbim.c
index 636acb9c1..2b4659fb3 100644
--- a/src/mm-modem-helpers-mbim.c
+++ b/src/mm-modem-helpers-mbim.c
@@ -1160,12 +1160,18 @@ mm_signal_from_mbim_signal_state (MbimDataClass data_class,
MMSignal **last_updated = NULL;
guint n_out_updated = 0;
- *out_cdma = NULL;
- *out_evdo = NULL;
- *out_gsm = NULL;
- *out_umts = NULL;
- *out_lte = NULL;
- *out_nr5g = NULL;
+ if (out_cdma)
+ *out_cdma = NULL;
+ if (out_evdo)
+ *out_evdo = NULL;
+ if (out_gsm)
+ *out_gsm = NULL;
+ if (out_umts)
+ *out_umts = NULL;
+ if (out_lte)
+ *out_lte = NULL;
+ if (out_nr5g)
+ *out_nr5g = NULL;
/* When MBIMEx v2.0 is available, we get LTE+5GNR information reported
* in the RSRP/SNR list of items. */