<div dir="ltr">Cross-posted from the modemmanager-devel list (<a href="http://lists.freedesktop.org/archives/modemmanager-devel/2014-June/001292.html">http://lists.freedesktop.org/archives/modemmanager-devel/2014-June/001292.html</a>)<div>

This is the right home for this patch.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 8:03 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>
diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c<br>
index 6f965e9..9464042 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;<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>