faketbts: Do RSL on the right streamId
The BSC might do RSL on different streamIds... deal with that.
This commit is contained in:
parent
f8a1a62bd0
commit
0a5f330ebe
|
@ -265,7 +265,7 @@ Object subclass: BTS [
|
|||
[oml txQueueIsEmpty] whileFalse: [(Delay forMilliseconds: 500) wait].
|
||||
]
|
||||
|
||||
startRSL: aPort [
|
||||
startRSL: aPort streamId: anId [
|
||||
<category: 'rsl'>
|
||||
"TODO: handle the stream."
|
||||
|
||||
|
@ -275,6 +275,7 @@ Object subclass: BTS [
|
|||
onStop: [self rslStopped];
|
||||
onConnect: [self rslConnected];
|
||||
btsId: bts_id;
|
||||
streamId: anId;
|
||||
yourself.
|
||||
|
||||
rsl connect: oml address port: aPort.
|
||||
|
|
|
@ -63,7 +63,7 @@ Osmo.IPAProtoHandler subclass: BTSIPAProtoHandler [
|
|||
|
||||
Object subclass: BTSConnectionBase [
|
||||
| socket txQueue mux demux rxDispatch rxProc txProc stopped
|
||||
onData onStop onConnect connected address btsId |
|
||||
onData onStop onConnect connected address btsId streamId |
|
||||
<category: 'BTS-Core'>
|
||||
<comment: 'I am the base class for the OML and RSL connection
|
||||
to the BSC'>
|
||||
|
@ -79,6 +79,16 @@ Object subclass: BTSConnectionBase [
|
|||
^ btsId ifNil: ['1801/0/0']
|
||||
]
|
||||
|
||||
streamId: anId [
|
||||
<category: 'creation'>
|
||||
streamId := anId
|
||||
]
|
||||
|
||||
streamId [
|
||||
<category: 'query'>
|
||||
^ streamId ifNil: [self class ipaPrototype]
|
||||
]
|
||||
|
||||
connect: anAddress [
|
||||
<category: 'connect'>
|
||||
^ self connect: anAddress port: self class defaultPort
|
||||
|
@ -165,7 +175,7 @@ Object subclass: BTSConnectionBase [
|
|||
|
||||
send: aMsg [
|
||||
<category: 'send'>
|
||||
mux nextPut: aMsg with: self class ipaPrototype
|
||||
mux nextPut: aMsg with: self streamId
|
||||
]
|
||||
|
||||
onData: aBlock [
|
||||
|
@ -231,7 +241,7 @@ BTSConnectionBase subclass: BTSOmlConnection [
|
|||
streamConnected [
|
||||
<category: 'initialize'>
|
||||
rxDispatch
|
||||
addHandler: self class ipaPrototype
|
||||
addHandler: self streamId
|
||||
on: [:msg | self handleOml: msg].
|
||||
]
|
||||
|
||||
|
@ -258,11 +268,10 @@ BTSConnectionBase subclass: BTSRslConnection [
|
|||
streamConnected [
|
||||
<category: 'initialize'>
|
||||
rxDispatch
|
||||
addHandler: self class ipaPrototype
|
||||
addHandler: self streamId
|
||||
on: [:msg | self handleRsl: msg].
|
||||
]
|
||||
|
||||
|
||||
handleRsl: aMsg [
|
||||
<category: 'input'>
|
||||
onData value: aMsg
|
||||
|
|
|
@ -201,7 +201,7 @@ Object subclass: OMLBTSInit [
|
|||
startRSL: aRsl [
|
||||
| port |
|
||||
port := (aRsl port data asByteArray ushortAt: 1) swap16.
|
||||
bts startRSL: port.
|
||||
bts startRSL: port streamId: aRsl streamId data first.
|
||||
^ true
|
||||
]
|
||||
|
||||
|
|
Reference in New Issue