gisi: fix use of unitialised variable

Set no msg.version if it's not available.
This commit is contained in:
Andrzej Zaborowski 2010-12-23 05:39:39 +01:00 committed by Denis Kenzior
parent 0e9dfccac1
commit d9aeef28d3
1 changed files with 2 additions and 1 deletions

View File

@ -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);