summaryrefslogtreecommitdiff
path: root/src/gsmd
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-10-14 19:50:43 +0200
committerHarald Welte <laforge@gnumonks.org>2013-10-14 19:50:43 +0200
commitea175de97e6ecf87129a7412a67ce3146f56b5d1 (patch)
tree8ab95bc084ed5e093c5d012828f3d0487a6eee7d /src/gsmd
parent8781da796c22dc883985bb80d1e1d11fbdaa2135 (diff)
gsmd/AT@COPS: don't use cmd before it is allocatedHEADmaster
Diffstat (limited to 'src/gsmd')
-rw-r--r--src/gsmd/usock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
index 157a874..1ddfa47 100644
--- a/src/gsmd/usock.c
+++ b/src/gsmd/usock.c
@@ -1215,8 +1215,8 @@ static int usock_rcv_network(struct gsmd_user *gu, struct gsmd_msg_hdr *gph,
case GSMD_NETWORK_OPER_LIST:
if (g_use_ATatCOPS) {
g_last_cops_user = gu;
- g_last_cops_id = cmd->id;
cmd = atcmd_fill("AT@COPS=?", 9+1, &network_opers_cb, gu, 0, NULL);
+ g_last_cops_id = cmd->id;
} else
cmd = atcmd_fill("AT+COPS=?", 9+1, &network_opers_cb, gu, 0, NULL);
break;
personal git repositories of Harald Welte. Your mileage may vary