<div dir="ltr">I screwed this up during an internal review :|<div><br></div><div>Here's a trace of an artificial failed disconnect created by reducing the disconnect timeout to 1 s:</div><div><br></div><div><div>2014-06-19T19:12:19.204456+01:00 localhost ModemManager[15402]: <debug> Disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0'</div>

<div>2014-06-19T19:12:19.204535+01:00 localhost ModemManager[15402]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> disconnecting)</div><div>2014-06-19T19:12:19.206328+01:00 localhost ModemManager[15402]: <debug> Launching disconnection on data port (net/wwan0)</div>

<div>2014-06-19T19:12:19.206724+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] Sent message...#012<<<<<< RAW:#012<<<<<<   length = 108#012<<<<<<   data   = 03:00:00:00:6C:00:00:00:1C:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:0C:00:00:00:01:00:00:00:3C:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:7E:5E:2A:7E:4E:6F:72:72:73:6B:65:6E:7E:5E:2A:7E</div>

<div>2014-06-19T19:12:19.206986+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] Sent message (translated)...#012<<<<<< Header:#012<<<<<<   length      = 108#012<<<<<<   type        = command (0x00000003)#012<<<<<<   transaction = 28#012<<<<<< Fragment header:#012<<<<<<   total   = 1#012<<<<<<   current = 0#012<<<<<< Contents:#012<<<<<<   service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)#012<<<<<<   cid     = 'connect' (0x0000000c)#012<<<<<<   type    = 'set' (0x00000001)</div>

<div>2014-06-19T19:12:20.208974+01:00 localhost ModemManager[15402]: <debug> Couldn't disconnect bearer '/org/freedesktop/ModemManager1/Bearer/0'</div><div>2014-06-19T19:12:20.209060+01:00 localhost ModemManager[15402]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disconnecting -> connected)</div>

<div>2014-06-19T19:12:23.590720+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] Received message...#012>>>>>> RAW:#012>>>>>>   length = 84#012>>>>>>   data   = 03:00:00:80:54:00:00:00:1C:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:0C:00:00:00:00:00:00:00:24:00:00:00:00:00:00:00:03:00:00:00:00:00:00:00:00:00:00:00:7E:5E:2A:7E:4E:6F:72:72:73:6B:65:6E:7E:5E:2A:7E:00:00:00:00</div>

<div>2014-06-19T19:12:23.590821+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] No transaction matched in received message</div><div>2014-06-19T19:12:23.591792+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] Received unexpected message (translated)...#012>>>>>> Header:#012>>>>>>   length      = 84#012>>>>>>   type        = command-done (0x80000003)#012>>>>>>   transaction = 28#012>>>>>> Fragment header:#012>>>>>>   total   = 1#012>>>>>>   current = 0#012>>>>>> Contents:#012>>>>>>   status error = 'None' (0x00000000)#012>>>>>>   service      = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)#012>>>>>>   cid          = 'connect' (0x0000000c)</div>

<div>2014-06-19T19:12:29.661668+01:00 localhost ModemManager[15402]: <debug> Disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0'</div><div>2014-06-19T19:12:29.661754+01:00 localhost ModemManager[15402]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> disconnecting)</div>

<div>2014-06-19T19:12:29.664905+01:00 localhost ModemManager[15402]: <debug> Launching disconnection on data port (net/wwan0)</div><div>2014-06-19T19:12:29.665653+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] Sent message...#012<<<<<< RAW:#012<<<<<<   length = 108#012<<<<<<   data   = 03:00:00:00:6C:00:00:00:1D:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:0C:00:00:00:01:00:00:00:3C:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:7E:5E:2A:7E:4E:6F:72:72:73:6B:65:6E:7E:5E:2A:7E</div>

<div>2014-06-19T19:12:29.665724+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] Sent message (translated)...#012<<<<<< Header:#012<<<<<<   length      = 108#012<<<<<<   type        = command (0x00000003)#012<<<<<<   transaction = 29#012<<<<<< Fragment header:#012<<<<<<   total   = 1#012<<<<<<   current = 0#012<<<<<< Contents:#012<<<<<<   service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)#012<<<<<<   cid     = 'connect' (0x0000000c)#012<<<<<<   type    = 'set' (0x00000001)</div>

<div>2014-06-19T19:12:29.667842+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] Received message...#012>>>>>> RAW:#012>>>>>>   length = 84#012>>>>>>   data   = 03:00:00:80:54:00:00:00:1D:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:0C:00:00:00:10:00:00:00:24:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00</div>

<div>2014-06-19T19:12:29.667866+01:00 localhost ModemManager[15402]: [/dev/cdc-wdm0] Received message (translated)...#012>>>>>> Header:#012>>>>>>   length      = 84#012>>>>>>   type        = command-done (0x80000003)#012>>>>>>   transaction = 29#012>>>>>> Fragment header:#012>>>>>>   total   = 1#012>>>>>>   current = 0#012>>>>>> Contents:#012>>>>>>   status error = 'ContextNotActivated' (0x00000010)#012>>>>>>   service      = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)#012>>>>>>   cid          = 'connect' (0x0000000c)</div>

<div>2014-06-19T19:12:29.667907+01:00 localhost ModemManager[15402]: <debug> Session ID '0' already disconnected.</div><div>2014-06-19T19:12:29.667954+01:00 localhost ModemManager[15402]: <debug> (wwan0): port now disconnected</div>

<div>2014-06-19T19:12:29.668011+01:00 localhost ModemManager[15402]: <debug> Disconnected bearer '/org/freedesktop/ModemManager1/Bearer/0'</div><div>2014-06-19T19:12:29.668075+01:00 localhost ModemManager[15402]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disconnecting -> registered)</div>

</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 19, 2014 at 11:20 AM,  <span dir="ltr"><<a href="mailto:pprabhu@chromium.org" target="_blank">pprabhu@chromium.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Prathmesh Prabhu <<a href="mailto:pprabhu@chromium.org">pprabhu@chromium.org</a>><br>
<br>
The first case, with no error, needs to check that there was no original error.<br>
Currently, if an error occurs and the resulting NwError is parsed correctly, the<br>
case split treats it as a no-error case.<br>
---<br>
 src/mm-bearer-mbim.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c<br>
index 55305bb..643964d 100644<br>
--- a/src/mm-bearer-mbim.c<br>
+++ b/src/mm-bearer-mbim.c<br>
@@ -980,7 +980,7 @@ disconnect_set_ready (MbimDevice *device,<br>
         }<br>
<br>
         /* Now handle different response / error cases */<br>
-        if (parsed_result) {<br>
+        if (result && parsed_result) {<br>
             mm_dbg ("Session ID '%u': %s",<br>
                     session_id,<br>
                     mbim_activation_state_get_string (activation_state));<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.0.0.526.g5318336<br>
<br>
</font></span></blockquote></div><br></div>