summaryrefslogtreecommitdiffstats
path: root/gisi
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2010-12-23 05:39:39 +0100
committerDenis Kenzior <denkenz@gmail.com>2010-12-23 18:23:50 -0600
commitd9aeef28d38d6263cb10b54318512f5020f8f163 (patch)
treeac0b6f948da8365fa942f2e4673dbe2593fbf9ac /gisi
parent0e9dfccac189db888ed0a9b94fee0e94da7fe76d (diff)
downloadofono-d9aeef28d38d6263cb10b54318512f5020f8f163.tar.bz2
gisi: fix use of unitialised variable
Set no msg.version if it's not available.
Diffstat (limited to 'gisi')
-rw-r--r--gisi/modem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gisi/modem.c b/gisi/modem.c
index ff06cf22..9fb4d34c 100644
--- a/gisi/modem.c
+++ b/gisi/modem.c
@@ -293,7 +293,6 @@ static gboolean isi_callback(GIOChannel *channel, GIOCondition cond,
msg.error = 0;
msg.data = buf;
msg.len = len;
- msg.version = &mux->version;
if (modem->trace != NULL)
modem->trace(&msg, NULL);
@@ -311,6 +310,8 @@ static gboolean isi_callback(GIOChannel *channel, GIOCondition cond,
return TRUE;
}
+ msg.version = &mux->version;
+
if (g_isi_msg_id(&msg) == COMMON_MESSAGE)
common_message_decode(mux, &msg);