diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-11 08:14:48 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-11 08:14:48 +0100 |
commit | fcc2e50854fa17358e90407d366481af34608cbe (patch) | |
tree | 26d16fb71eef6d91e76ed8061e029d2a9c2fa58f | |
parent | 7bf1e7e0388284881f7de11c727ab736e34c4c7e (diff) |
GSM: Check if the LU is accepted and change the return type
-rw-r--r-- | GSMDriver.st | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/GSMDriver.st b/GSMDriver.st index 63b4530..538aaa3 100644 --- a/GSMDriver.st +++ b/GSMDriver.st @@ -1,5 +1,5 @@ Object subclass: GSMDriver [ - | sccp proc sapis completeSem result phoneConfig | + | sccp proc sapis completeSem phoneConfig | <category: 'osmo-gsm-operation'> <comment: 'I create a SCCP connection and handle stuff on it. In the base class I am just capable of handling BSSMAP Management and need to dispatch it to other @@ -25,10 +25,6 @@ classes.'> sapis := Dictionary new. ] - result [ - ^ result - ] - waitForCompletion [ <category: 'accessing'> ^ completeSem wait @@ -135,6 +131,7 @@ classes.'> ]. sapis at: aSapi ifPresent: [:handler | + handler handleData: aMsg sapi: aSapi. ]. 'Unhandled DTAP message' printNl. @@ -184,6 +181,11 @@ Object subclass: ProcedureBase [ ProcedureBase subclass: LUProcedure [ + | success | + + success [ + ^ success ifNil: [false] + ] createConnection: aHandler phone: aPhone [ | lu | @@ -197,7 +199,20 @@ ProcedureBase subclass: LUProcedure [ execute [ super execute. - 'LUProcedure is completed' printNl. + + self success + ifTrue: [ + 'LUAccept nicely succeeded.' printNl. + ] + ifFalse: [ + 'LURejected.' printNl. + ] + ] + + handleData: aMsg sapi: aSapi [ + aMsg class messageType = GSM48MMMessage msgLUAcc ifTrue: [ + success := true. + ]. ] ] |