<div dir="ltr">Heads up!<div><a href="mailto:benchan@chromium.org">benchan@chromium.org</a> had some offline comments.</div><div>I'll submit an updated patch set (mostly on Monday).</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Fri, Jun 13, 2014 at 2:19 PM,  <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>
diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c<br>
index 6f965e9..4bb5f35 100644<br>
--- a/src/libmbim-glib/mbim-device.c<br>
+++ b/src/libmbim-glib/mbim-device.c<br>
@@ -417,12 +417,13 @@ static void<br>
 process_message (MbimDevice  *self,<br>
                  const MbimMessage *message)<br>
 {<br>
+    gboolean is_partial_fragment;<br>
+<br>
+    is_partial_fragment = (_mbim_message_is_fragment (message) &&<br>
+                           _mbim_message_fragment_get_total (message) > 1);<br>
+<br>
     if (mbim_utils_get_traces_enabled ()) {<br>
         gchar *printable;<br>
-        gboolean is_partial_fragment;<br>
-<br>
-        is_partial_fragment = (_mbim_message_is_fragment (message) &&<br>
-                               _mbim_message_fragment_get_total (message) > 1);<br>
<br>
         printable = __mbim_utils_str_hex (((GByteArray *)message)->data,<br>
                                           ((GByteArray *)message)->len,<br>
@@ -468,8 +469,18 @@ process_message (MbimDevice  *self,<br>
             /* Grab transaction */<br>
             tr = device_match_transaction (self, TRANSACTION_TYPE_HOST, message);<br>
             if (!tr) {<br>
+                gchar *printable = NULL;<br>
+<br>
                 g_debug ("[%s] No transaction matched in received message",<br>
                          self->priv->path_display);<br>
+                /* Attempt to print a user friendly dump of the packet anyway */<br>
+                printable = mbim_message_get_printable (message, ">>>>>> ", !!is_partial_fragment);<br>
+                if (printable) {<br>
+                    g_debug ("[%s] Received unexpected message (translated)...\n%s",<br>
+                             self->priv->path_display,<br>
+                             printable);<br>
+                    g_free (printable);<br>
+                }<br>
                 return;<br>
             }<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.0.0.526.g5318336<br>
<br>
</font></span></blockquote></div><br></div>