summaryrefslogtreecommitdiffstats
path: root/src/host/layer23
diff options
context:
space:
mode:
authorKurtis Heimerl <kheimerl@cs.berkeley.edu>2012-02-02 08:39:56 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2012-02-02 08:39:56 +0100
commit987787f0cb7a32cf74b683244e97022f7b3d5604 (patch)
treee72272ae5f7ab36fcfbab10154a6cd1bc405ca9b /src/host/layer23
parent0eecdf24f3da797e3c6342e60b28f7dfcd467976 (diff)
Just a quick bug fix to gsm322.c.
Basically, there were two commands in an "else" block without brackets, causing the "end = 1023+299" command to execute regardless of the state of index. Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
Diffstat (limited to 'src/host/layer23')
-rw-r--r--src/host/layer23/src/mobile/gsm322.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c
index c5b87b28..ce5e1e1d 100644
--- a/src/host/layer23/src/mobile/gsm322.c
+++ b/src/host/layer23/src/mobile/gsm322.c
@@ -1840,10 +1840,11 @@ static int gsm322_cs_select(struct osmocom_ms *ms, int index, uint16_t mcc,
/* loop through all scanned frequencies and select cell.
* if an index is given (arfci), we just check this cell only */
- if (index >= 0)
+ if (index >= 0) {
start = end = index;
- else
+ } else {
start = 0; end = 1023+299;
+ }
for (i = start; i <= end; i++) {
cs->list[i].flags &= ~GSM322_CS_FLAG_TEMP_AA;
s = cs->list[i].sysinfo;