fibocom: Fix GTRNDIS parsing function

This fixes a bug introduced in a2a0e2d754. Since the state pointer is
always non-NULL, the function will always fail if GTRNDIS is inactive,
i.e. the modem will return state=0 and no cid field.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
This commit is contained in:
Sven Schwermer
2022-06-28 14:39:01 +02:00
parent a2a0e2d754
commit a2195babf2
@@ -50,7 +50,7 @@ parse_gtrndis_read_response (const gchar *response,
return FALSE;
}
if (state) {
if (*state) {
if (!mm_get_uint_from_match_info (match_info, 2, cid)) {
g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
"Failed to match cid in +GTRNDIS response: %s", response);