Am Montag, den 16.03.2009, 14:25 +0100 schrieb Alain2210: > Hello, > > I answer again to myself. > > > > '+CMGL: > > > > > > 1,2,25\r\n07913386094000F0110100810000FF11E3F2380D2ACFE9A0BA1B549ECFC369FFFF\r\nOK\r\n' > > > > > I think there is two problems : header and sms. > 1) header, I have modified const.py to have : > > # +CMGL: 1,1,"",125 > PAT_SMS_PDU_HEADER = re.compile( > '(?P<index>\d+),(?P<status>\d+)(?:,"(?P<name>[^ > "]*)")?,(?P<pdulen>\d+)' ) > > that is the "," is now in the name block
Didn't I do the same in mediator.py? > 2) this sms is without destination adress so sms.py makes an error. To avoid > this, I have patched sms.py with this : > --- sms.py.orig Sat Mar 14 15:43:25 2009 > +++ sms.py Mon Mar 16 13:17:16 2009 > @@ -157,7 +157,9 @@ > # XXX: Is this correct? Can we detect the @-padding issue in > # address_len? > address_len = 1 + (bytes[offset] + 1) / 2 > offset += 1 > - address = PDUAddress.decode( bytes[offset:offset+address_len] ) > + address = ""; > + if (address_len > 1): > + address = PDUAddress.decode( bytes[offset:offset+address_len] ) > return ( address, address_len + 1 ) > > def _parse_userdata( self, ud_len, bytes ): Excellent, thanks! -- :M: _______________________________________________ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland