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

config: Keep the current connection inside the BSCConfigItem

For paging we will need to go from the MSC to the BSCs and then to the
connection to enqueue the paging messages.
This commit is contained in:
Holger Hans Peter Freyther 2013-01-08 13:40:21 +01:00 committed by Holger Hans Peter Freyther
parent bb38dd32ea
commit 91d3d3ef7a
2 changed files with 14 additions and 10 deletions

View File

@ -1,5 +1,5 @@
"
(C) 2010-2012 by Holger Hans Peter Freyther
(C) 2010-2013 by Holger Hans Peter Freyther
All Rights Reserved
This program is free software: you can redistribute it and/or modify
@ -19,7 +19,7 @@
PackageLoader fileInPackage: #Sockets.
Object subclass: BSCConfigItem [
| peer token name lac connected osmoExtension |
| peer token name lac connection osmoExtension |
<category: 'OsmoMSC-BSC'>
<comment: 'I hold the configuration for one BSC Item. It consists of the
@ -29,7 +29,7 @@ peer address, the lac, if it is connected'>
^ self new
peer: aPeer;
name: aName;
connected: false;
connection: nil;
sendOsmoRSIP: false;
lac: -1;
yourself
@ -60,10 +60,14 @@ peer address, the lac, if it is connected'>
lac := aLac.
]
connected [ <category: 'accessing'> ^ connected ]
connected: aState [
connected [
<category: 'accessing'>
^ connection isNil not
]
connection: aCon [
<category: 'private'>
connected := aState.
connection := aCon.
]
sendOsmoRSIP [ <category: 'accessing'> ^ osmoExtension ]

View File

@ -1,5 +1,5 @@
"
(C) 2010-2011 by Holger Hans Peter Freyther
(C) 2010-2013 by Holger Hans Peter Freyther
All Rights Reserved
This program is free software: you can redistribute it and/or modify
@ -110,11 +110,11 @@ Object subclass: MSCBSCConnectionHandler [
Processor activeProcess name: 'MSCBSCConnectionHandler(%1)' % {aConfig lac}.
[[
aConfig connected: true.
aConfig connection: bsc.
self connections add: bsc.
bsc process.
] on: SystemExceptions.EndOfStream do: [:ex |
aConfig connected: false.
aConfig connection: nil.
self logNotice: 'BSC disconnected for lac: %1' % {aConfig lac}
area: #bsc.
] on: Exception do: [:ex |
@ -129,7 +129,7 @@ Object subclass: MSCBSCConnectionHandler [
self logError: 'BSC was never added on lac: %1?' % {aConfig lac}
area: #bsc].
aConfig connected: false.
aConfig connection: nil.
aConnection close.
].
] fork.