aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-02-20 19:58:21 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-02-21 16:07:49 +0100
commit7af3b25ebf8544e0947c0bce09e9b8b8561fb72d (patch)
tree2b9de8bd873d8280c1a2393b5f32f29045d8ae0b
parent157518a9d6eb4ce204b55dd51e7cd840a0cb6949 (diff)
bsc: Move out the SCCPHandler into a new file
-rw-r--r--Start.st1
-rw-r--r--package.xml1
-rw-r--r--src/BSCIPAConnection.st38
-rw-r--r--src/BSCSCCPHandler.st64
4 files changed, 66 insertions, 38 deletions
diff --git a/Start.st b/Start.st
index c2d049b..81faa8e 100644
--- a/Start.st
+++ b/Start.st
@@ -5,6 +5,7 @@ Eval [
fileIn: 'src/HLR.st';
fileIn: 'src/BSCConfig.st';
fileIn: 'src/BSCListener.st';
+ fileIn: 'src/BSCSCCPHandler.st';
fileIn: 'src/GSMProcessor.st';
fileIn: 'src/GSMMOCall.st';
fileIn: 'src/BSCIPAConnection.st';
diff --git a/package.xml b/package.xml
index c2aa6dc..cda13a3 100644
--- a/package.xml
+++ b/package.xml
@@ -10,6 +10,7 @@
<filein>src/HLR.st</filein>
<filein>src/BSCConfig.st</filein>
<filein>src/BSCListener.st</filein>
+ <filein>src/BSCSCCPHandler.st</filein>
<filein>src/GSMProcessor.st</filein>
<filein>src/GSMMOCall.st</filein>
<filein>src/BSCIPAConnection.st</filein>
diff --git a/src/BSCIPAConnection.st b/src/BSCIPAConnection.st
index d25b219..12a4fb1 100644
--- a/src/BSCIPAConnection.st
+++ b/src/BSCIPAConnection.st
@@ -20,44 +20,6 @@ PackageLoader
fileInPackage: 'OsmoMGCP';
fileInPackage: 'OsmoNetwork'.
-OsmoGSM.SCCPHandler subclass: BSCSCCPHandler [
- | bsc msc |
-
- <category: 'OsmoMSC-BSC'>
- <comment: 'I handle SCCP for the MSC/BSC connection'>
-
- BSCSCCPHandler class >> initWith: aBSC msc: aMSC [
- ^ self new
- instVarNamed: #bsc put: aBSC;
- instVarNamed: #msc put: aMSC;
- yourself
- ]
-
- connectionSpecies [
- ^ GSMProcessor
- ]
-
- bsc [
- <category: 'accessing'>
- ^ bsc
- ]
-
- msc [
- <category: 'accessing'>
- ^ msc
- ]
-
- handleMsg: aMsg [
- ^ super handleMsg: aMsg.
- ]
-
- newConnection: aConnection [
- self logNotice: 'New incoming SCCP connection %1 on the BSC %2'
- % {aConnection srcRef. bsc lac} area: #bsc.
- ^ super newConnection: aConnection.
- ]
-]
-
Object subclass: BSCConnection [
| config msc trunk |
diff --git a/src/BSCSCCPHandler.st b/src/BSCSCCPHandler.st
new file mode 100644
index 0000000..1fca5ac
--- /dev/null
+++ b/src/BSCSCCPHandler.st
@@ -0,0 +1,64 @@
+"
+ (C) 2010-2012 by Holger Hans Peter Freyther
+ All Rights Reserved
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+"
+
+PackageLoader
+ fileInPackage: 'OsmoGSM'.
+
+OsmoGSM.SCCPHandler subclass: BSCSCCPHandler [
+ | bsc msc |
+
+ <category: 'OsmoMSC-BSC'>
+ <comment: 'I handle SCCP for the MSC/BSC connection'>
+
+ BSCSCCPHandler class >> initWith: aBSC msc: aMSC [
+ ^ self new
+ instVarNamed: #bsc put: aBSC;
+ instVarNamed: #msc put: aMSC;
+ yourself
+ ]
+
+ connectionSpecies [
+ ^ GSMProcessor
+ ]
+
+ bsc [
+ <category: 'accessing'>
+ ^ bsc
+ ]
+
+ msc [
+ <category: 'accessing'>
+ ^ msc
+ ]
+
+ handleMsg: aMsg [
+ ^ super handleMsg: aMsg.
+ ]
+
+ handleUDT: aMsg [
+ "I need to handle a reset and such"
+ ^ super handleUDT: aMsg.
+ ]
+
+ newConnection: aConnection [
+ self logNotice: 'New incoming SCCP connection %1 on the BSC %2'
+ % {aConnection srcRef. bsc lac} area: #bsc.
+ ^ super newConnection: aConnection.
+ ]
+]
+