Am Dienstag, den 17.03.2009, 10:02 +0100 schrieb Alain2210: > Selon Michael 'Mickey' Lauer <mic...@vanille-media.de>: > > .... > > > 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? > > I think no : in git.fso I read now const.py : > # +CMGL: 1,1,"",125 > PAT_SMS_PDU_HEADER = re.compile( > '(?P<index>\d+),(?P<status>\d+),(?:"(?P<name>[^"]*)")?,(?P<pdulen>\d+)' )
Which gets overridden by the Neptune's mediator.py like that: # modem violating 05.05 here # the ',' before the name was not supposed to be optional # +CMGL: 6,1,125 PAT_SMS_PDU_HEADER = re.compile( '(?P<index>\d+),(?P<status>\d +)(?:,"(?P<name>[^"]*)")?,(?P<pdulen>\d+)' ) # modem violating 05.05 here: # the ',' before the name was not supposed to be optional # +CMGR: 1,155 PAT_SMS_PDU_HEADER_SINGLE = re.compile( '(?P<status>\d +)(?:,"(?P<name>[^"]*)")?,(?P<pdulen>\d+)' ) const.PAT_SMS_PDU_HEADER = PAT_SMS_PDU_HEADER const.PAT_SMS_PDU_HEADER_SINGLE = PAT_SMS_PDU_HEADER_SINGLE That should have the same effect as changing it in const.py, shouldn't it? If it doesn't work, then I will pull these constants up into the modem abstraction. > > > 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! > > > > When (if) you have time, could it be commit. Such that I can use the original > frameworkd ? If Daniel ACKs this change. then we can commit asap. -- :M: _______________________________________________ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland