2009/5/21 Dan Williams <d...@redhat.com> > On Thu, 2009-05-21 at 09:15 +0200, Pablo Martí Gamboa wrote: > > > > > > 2009/5/21 Dan Williams <d...@redhat.com> > > On Wed, 2009-05-20 at 10:23 +0200, Pablo Martí Gamboa wrote: > > > Hi all, > > > > > > I've just been bitten by a small bug in src/nm-gsm-device.c > > +443: > > > > > > const char *responses[] = { "+CREG: 0,0", "+CREG: 0,1", > > "+CREG: 0,2", > > > "+CREG: 0,3", "+CREG: 0,5", NULL }; > > > > > > > > > If an external implementation has send '+CREG=1' those > > terminators > > > won't work. I think that you should just check the last part > > of the > > > +CREG response. > > > > > > What would the response & terminator look like in that case? > > Not quite > > sure I follow. > > > > Something along the lines of what is done in ModemManager: > > if (g_str_has_prefix (response->str, "+CREG: ")) { > > int unsolicited, stat; > > sscanf (response->str + 7, "%d,%d", &unsolicited, &stat); > > .... > > switch(stat) { > > case 5: break; > > case 4: break; > > .... > > } > > } > > Right, but I meant what is the exact response that's screwing up NM here > on 0.7 branch? In 0.7 we do need to match the full response, otherwise > we might match some other unsolicited response the modem sends, instead > of CREG.
It does not recognizes responses like +CREG: 1,1. For now my workaround has been to disable +CREG notifications right before connecting via NM DBus[0], otherwise it won't work. AFAICT this wasn't present in the NM shipped with Fedora 10, OpenSUSE 11.1 or Ubuntu 8.10. [0] http://public.warp.es/wader/browser/node/core/trunk/wader/common/dialers/nm_pppd.py#L84 > > > Dan > > > > -- Pablo Martí http://www.linkedin.com/in/pmarti || http://www.warp.es python -c "print '706d6172746940776172702e6573'.decode('hex')"
_______________________________________________ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list