[pkg-fso-commits] [SCM] framworkd debian packageing branch, master, updated. milestone2-89-geb27523
Daniel Willmann
daniel at totalueberwachung.de
Sat Aug 23 14:06:20 UTC 2008
The following commit has been merged in the master branch:
commit 6287748b2bcea4c1c4e3655f74f19e33219233f5
Author: Daniel Willmann <daniel at totalueberwachung.de>
Date: Mon Aug 18 17:53:22 2008 +0200
ogsmd: Introduce a new class PDUAddress that represents the GSM address (number)
fields and use it.
diff --git a/framework/subsystems/ogsmd/gsm/sms.py b/framework/subsystems/ogsmd/gsm/sms.py
index ce9f369..6658517 100644
--- a/framework/subsystems/ogsmd/gsm/sms.py
+++ b/framework/subsystems/ogsmd/gsm/sms.py
@@ -35,7 +35,7 @@ def decodeSMS( pdu ):
# SCA - Service Center address
sca_len = bytes[offset]
offset += 1
- sms.sca = decodePDUNumber( bytes[offset:offset+sca_len] )
+ sms.sca = PDUAddress( *decodePDUNumber( bytes[offset:offset+sca_len] ) )
offset += sca_len
# PDU type
@@ -60,7 +60,7 @@ def decodeSMS( pdu ):
# WARNING, the length is coded in digits of the number, not in octets occupied!
oa_len = 1 + (bytes[offset] + 1) / 2
offset += 1
- sms.oa = decodePDUNumber( bytes[offset:offset+oa_len] )
+ sms.oa = PDUAddress( *decodePDUNumber( bytes[offset:offset+oa_len] ) )
sms.da = sms.oa
offset += oa_len
@@ -123,6 +123,16 @@ def parse_userdata( sms, ud_len, bytes ):
def encodeSMS( to, sender, serviceCenter, data ):
pass
+class PDUAddress:
+ def __init__( self, type, dialplan, number ):
+ self.type = type
+ self.dialplan = dialplan
+ self.number = number
+ def __str__( self ):
+ prefix = ""
+ if self.type == 1:
+ prefix = "+"
+ return prefix + str(self.number)
class AbstractSMS:
def __init__( self ):
--
framworkd debian packageing
More information about the pkg-fso-commits
mailing list