[PATCH] bearer-mbim: fix disconnect error handling case split

pprabhu at chromium.org pprabhu at chromium.org
Thu Jun 19 11:20:02 PDT 2014


From: Prathmesh Prabhu <pprabhu at chromium.org>

The first case, with no error, needs to check that there was no original error.
Currently, if an error occurs and the resulting NwError is parsed correctly, the
case split treats it as a no-error case.
---
 src/mm-bearer-mbim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
index 55305bb..643964d 100644
--- a/src/mm-bearer-mbim.c
+++ b/src/mm-bearer-mbim.c
@@ -980,7 +980,7 @@ disconnect_set_ready (MbimDevice *device,
         }
 
         /* Now handle different response / error cases */
-        if (parsed_result) {
+        if (result && parsed_result) {
             mm_dbg ("Session ID '%u': %s",
                     session_id,
                     mbim_activation_state_get_string (activation_state));
-- 
2.0.0.526.g5318336



More information about the ModemManager-devel mailing list