smalltalk
/
osmo-st-gsm
Archived
1
0
Fork 0

sccp: Differentiate Released and ReleaseComplete

This commit is contained in:
Holger Hans Peter Freyther 2010-12-16 21:20:35 +01:00
parent 198eaba529
commit d85ae734ae
2 changed files with 5 additions and 3 deletions

View File

@ -24,6 +24,7 @@ Object subclass: SCCPConnection [
SCCPConnection class >> stateInitial [ ^ 0 ]
SCCPConnection class >> stateConnected [ ^ 1 ]
SCCPConnection class >> stateReleased [ ^ 2 ]
SCCPConnection class >> stateReleaseComplete [ ^ 3 ]
SCCPConnection class >> stateTimeout [ ^ 3 ]
SCCPConnection class >> new [
@ -144,6 +145,7 @@ Object subclass: SCCPConnection [
releaseComplete: aMSG [
"TODO: verify that we are in the right state"
state := SCCPConnection stateReleaseComplete.
self terminate.
]
@ -151,7 +153,7 @@ Object subclass: SCCPConnection [
| rlc |
"Give up local resources here. We are done."
state := SCCPConnection stateReleased.
state := SCCPConnection stateReleaseComplete.
rlc := Osmo.SCCPConnectionReleaseComplete
initWithDst: aRLSD src src: aRLSD dst.
self nextPut: rlc toMessage.

View File

@ -505,8 +505,8 @@ TestCase subclass: SCCPHandlerTest [
"Now close the connection"
serverCon release.
self assert: serverCon state = SCCPConnection stateReleased.
self assert: con state = SCCPConnection stateReleased.
self assert: serverCon state = SCCPConnection stateReleaseComplete.
self assert: con state = SCCPConnection stateReleaseComplete.
self assert: client connections size = 0.
self assert: server connections size = 0.