aboutsummaryrefslogtreecommitdiffstats
path: root/SCCPHandler.st
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-28 10:14:15 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-11-28 21:27:58 +0100
commit3becc2bf0c855508d5e4af41961d55da657cb484 (patch)
treee58bc98b38cdedd4223c4354a5377a44e846fc09 /SCCPHandler.st
parent1639173a26840b3bd59bc4949effbb1e2d2e7789 (diff)
SCCP: Start dispatching the messages.
Diffstat (limited to 'SCCPHandler.st')
-rw-r--r--SCCPHandler.st32
1 files changed, 31 insertions, 1 deletions
diff --git a/SCCPHandler.st b/SCCPHandler.st
index ffbadf3..d7f4c1e 100644
--- a/SCCPHandler.st
+++ b/SCCPHandler.st
@@ -14,6 +14,10 @@ Object subclass: SCCPConnection [
dst := aRef
]
+ dstRef [
+ ^ dst
+ ]
+
enqueueForRead: aMsg [
self queue next: aMsg.
]
@@ -73,6 +77,18 @@ Object subclass: SCCPHandler [
on: self with: #handleMsg:.
]
+ connectionConfirm: aCC [
+ 'Confirm' printNl.
+
+ connections do: [:each |
+ each srcRef = aCC dst
+ ifTrue: [
+ 'Found pending connection' printNl.
+ each dstRef: aCC src.
+ ].
+ ]
+ ]
+
handleMsg: aMsg [
| sccp |
@@ -86,7 +102,21 @@ Object subclass: SCCPHandler [
] on: Exception do: [
self logError: 'Failed to parse message' area: #sccp.
aMsg asByteArray printNl.
- ]
+ ^ false
+ ].
+
+ (sccp isKindOf: Osmo.SCCPConnectionConfirm)
+ ifTrue: [
+ self connectionConfirm: sccp.
+ ].
+ (sccp isKindOf: Osmo.SCCPConnectionData)
+ ifTrue: [
+ 'Connection Data' printNl.
+ ].
+ (sccp isKindOf: Osmo.SCCPConnectionReleased)
+ ifTrue: [
+ 'Released' printNl.
+ ].
]
createConnection: aData [