summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-04-25 08:54:42 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-04-25 08:54:42 +0000
commita4b4951f076bd3a8e5cab2ee0b36b7c23dc93fd3 (patch)
tree399e90e641e9be3ca0e4b42f8b6ba34f545de773 /src
parentf4f201c63c797080884432c9a716021ac328ff9e (diff)
zero LAC and CI if +CREG is 0 / 2 (and not 1). (Closes: #454)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@1827 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src')
-rw-r--r--src/gsmd/unsolicited.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gsmd/unsolicited.c b/src/gsmd/unsolicited.c
index c355c71..251f4ed 100644
--- a/src/gsmd/unsolicited.c
+++ b/src/gsmd/unsolicited.c
@@ -160,7 +160,8 @@ static int creg_parse(char *buf, int len, const char *param,
if (!comma)
return -EINVAL;
aux->u.netreg.ci = strtoul(comma+2, NULL, 16);
- }
+ } else
+ aux->u.netreg.lac = aux->u.netreg.ci = 0;
return usock_evt_send(gsmd, ucmd, GSMD_EVT_NETREG);
}
personal git repositories of Harald Welte. Your mileage may vary