diff options
author | dequis <dx@dxzone.com.ar> | 2015-04-12 12:27:31 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-04-12 12:27:31 -0300 |
commit | 951aefdab1f09f35f2deef8c490b590313c94192 (patch) | |
tree | a1cd6d8934c383f75a4e1b64e3c93bf5d7ef96fa /protocols/msn/ns.c | |
parent | 5fbf8152c7e760ca2c4140f54ba56c62bcd2571b (diff) |
msn/gw.c: ensure that the im_connection still exists in callbacks
Diffstat (limited to 'protocols/msn/ns.c')
-rw-r--r-- | protocols/msn/ns.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 284a3c37..f4ee0806 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -89,7 +89,7 @@ gboolean msn_ns_connect(struct im_connection *ic, const char *host, int port) } if (md->is_http) { - md->gw = msn_gw_new(md); + md->gw = msn_gw_new(ic); md->gw->callback = msn_ns_callback; msn_ns_connected(md, -1, B_EV_IO_READ); } else { @@ -147,12 +147,7 @@ static gboolean msn_ns_connected(gpointer data, gint source, b_input_condition c void msn_ns_close(struct msn_data *md) { if (md->gw) { - if (md->gw->waiting) { - /* mark it as closed, let the request callback clean it */ - md->gw->open = FALSE; - } else { - msn_gw_free(md->gw); - } + msn_gw_free(md->gw); } if (md->fd >= 0) { closesocket(md->fd); |