broadband-modem-qmi: don't depend on other TLVs when processing Signal Info

When processing the NAS Signal Info message, don't assume that a
previously processed TLV creates the MMSignal object for a given
access technology.
This commit is contained in:
Aleksander Morgado
2022-11-22 11:07:22 +00:00
parent f676420b57
commit 49234bd235

View File

@@ -12053,6 +12053,8 @@ signal_load_values_get_signal_info_ready (QmiClientNas *client,
if (qmi_message_nas_get_signal_info_output_get_wcdma_rscp (output,
&rscp_umts,
NULL)) {
if (G_UNLIKELY (!ctx->values_result->umts))
ctx->values_result->umts = mm_signal_new ();
mm_signal_set_rscp (ctx->values_result->umts, (-1.0) * ((gdouble)rscp_umts));
}
@@ -12083,6 +12085,8 @@ signal_load_values_get_signal_info_ready (QmiClientNas *client,
if (qmi_message_nas_get_signal_info_output_get_5g_signal_strength_extended (output,
&rsrq_5g,
NULL)) {
if (G_UNLIKELY (!ctx->values_result->nr5g))
ctx->values_result->nr5g = mm_signal_new ();
mm_signal_set_rsrq (ctx->values_result->nr5g, (gdouble)rsrq_5g);
}