limit GPRS channel allocation to number actually requested, without this all of CN is filled with GPRS if we request anything from it

This commit is contained in:
Michael Iedema
2015-08-28 11:26:07 +00:00
committed by Michael Iedema
parent f6dd22cb5c
commit 2992951933

View File

@@ -368,10 +368,14 @@ static unsigned getChanGroup(vector<ChanType*>& chanList, ChanType **results)
// Allocate a group of channels for gprs. // Allocate a group of channels for gprs.
// See comments at getChanGroup. // See comments at getChanGroup.
int GSMConfig::getTCHGroup(int /* unused groupSize*/,TCHFACCHLogicalChannel **results) int GSMConfig::getTCHGroup(int groupSize,TCHFACCHLogicalChannel **results)
{ {
ScopedLock lock(mLock); ScopedLock lock(mLock);
int nfound = getChanGroup<TCHFACCHLogicalChannel>(mTCHPool,results); int nfound = getChanGroup<TCHFACCHLogicalChannel>(mTCHPool,results);
// limit to channels actually requested
if (groupSize < nfound) {
nfound = groupSize;
}
for (int i = 0; i < nfound; i++) { for (int i = 0; i < nfound; i++) {
results[i]->lcGetL1()->setGPRS(true,NULL); results[i]->lcGetL1()->setGPRS(true,NULL);
} }