<div dir="ltr">Reposting to libmbim-devel, since that's the right home for this guy.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 7:45 AM, Dan Williams <span dir="ltr"><<a href="mailto:dcbw@redhat.com" target="_blank">dcbw@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wed, 2014-06-18 at 07:30 -0700, Prathmesh Prabhu Chromium wrote:<br>
> Hi Aleksander/Dan,<br>
><br>
> Any comments? This has been useful to debug some mismatched transactions<br>
> issues locally.<br>
<br>
</div>Patch looks fine to me.  I can't push though because I'm lazy and<br>
haven't requested permissions for libmbim.  Which I should really do...<br>
<br>
Dan<br>
<div><div class="h5"><br>
> Thanks,<br>
> Prathmesh<br>
><br>
><br>
> On Mon, Jun 16, 2014 at 2:44 PM, <<a href="mailto:pprabhu@chromium.org">pprabhu@chromium.org</a>> wrote:<br>
><br>
> > From: Prathmesh Prabhu <<a href="mailto:pprabhu@chromium.org">pprabhu@chromium.org</a>><br>
> ><br>
> > diff --git a/src/libmbim-glib/mbim-device.c<br>
> > 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) ><br>
> > 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)<br>
> > > 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,<br>
> > message);<br>
> >              if (!tr) {<br>
> > +                gchar *printable;<br>
> > +<br>
> >                  g_debug ("[%s] No transaction matched in received<br>
> > message",<br>
> >                           self->priv->path_display);<br>
> > +                /* Attempt to print a user friendly dump of the packet<br>
> > anyway */<br>
> > +                printable = mbim_message_get_printable (message, ">>>>>><br>
> > ", is_partial_fragment);<br>
> > +                if (printable) {<br>
> > +                    g_debug ("[%s] Received unexpected message<br>
> > (translated)...\n%s",<br>
> > +                             self->priv->path_display,<br>
> > +                             printable);<br>
> > +                    g_free (printable);<br>
> > +                }<br>
> >                  return;<br>
> >              }<br>
> ><br>
> > --<br>
> > 2.0.0.526.g5318336<br>
> ><br>
> ><br>
</div></div>> _______________________________________________<br>
> ModemManager-devel mailing list<br>
> <a href="mailto:ModemManager-devel@lists.freedesktop.org">ModemManager-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel</a><br>
<br>
<br>
</blockquote></div><br></div>