From d95114a576adbe56e0611e8c1f0b2908d274c52c Mon Sep 17 00:00:00 2001 From: Nagi Marupaka Date: Sat, 13 May 2023 07:18:48 +0000 Subject: modem-helpers-mbim: allow optional outputs in mm_signal_from_mbim_signal_state() Fixes 470dff235c70683928ab0eb39c64151a8a4ceb7c --- src/mm-modem-helpers-mbim.c | 18 ++++++++++++------ 1 file 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. */ -- cgit v1.2.1