diff options
-rw-r--r-- | plugins/ste.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ste.c b/plugins/ste.c index 8bebfa48..ae6c8192 100644 --- a/plugins/ste.c +++ b/plugins/ste.c @@ -191,6 +191,7 @@ static GIOChannel *ste_create_channel(struct ofono_modem *modem) interface = ofono_modem_get_string(modem, "Interface"); if (interface) { struct ifreq ifreq; + memset(&ifreq, 0, sizeof(ifreq)); strcpy(ifreq.ifr_name, interface); err = setsockopt(fd, SOL_SOCKET, @@ -227,6 +228,7 @@ static GIOChannel *ste_create_channel(struct ofono_modem *modem) close(fd); return NULL; } + g_io_channel_set_close_on_unref(channel, TRUE); return channel; @@ -246,7 +248,7 @@ static int ste_enable(struct ofono_modem *modem) data->chat = g_at_chat_new_blocking(channel, syntax); g_at_chat_send(data->chat, "AT&F E0 V1 X4 &C1 +CMEE=1", - NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL); g_io_channel_unref(channel); g_at_syntax_unref(syntax); |