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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user