mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 11:50:10 +02:00
Connection tag variable wasn't deinitialized, so when destroying a DCC
record it might have stopped a wrong timeout/io func (or probably not, because new source func was allocated soon after, and it'd have the same tag which would just be free'd twice). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2324 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
59e32a18c9
commit
d6abc84ab5
3 changed files with 7 additions and 2 deletions
|
|
@ -320,8 +320,9 @@ static void dcc_chat_listen(CHAT_DCC_REC *dcc)
|
|||
|
||||
/* TODO: add paranoia check - see dcc-files.c */
|
||||
|
||||
g_source_remove(dcc->tagconn);
|
||||
net_disconnect(dcc->handle);
|
||||
g_source_remove(dcc->tagconn);
|
||||
dcc->tagconn = -1;
|
||||
|
||||
dcc->starttime = time(NULL);
|
||||
dcc->handle = handle;
|
||||
|
|
@ -349,6 +350,8 @@ static void sig_chat_connected(CHAT_DCC_REC *dcc)
|
|||
|
||||
/* connect ok. */
|
||||
g_source_remove(dcc->tagconn);
|
||||
dcc->tagconn = -1;
|
||||
|
||||
dcc->starttime = time(NULL);
|
||||
dcc->sendbuf = net_sendbuffer_create(dcc->handle, 0);
|
||||
dcc->tagread = g_input_add(dcc->handle, G_INPUT_READ,
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ static void sig_dccget_connected(GET_DCC_REC *dcc)
|
|||
}
|
||||
|
||||
g_source_remove(dcc->tagconn);
|
||||
dcc->tagconn = -1;
|
||||
|
||||
g_free_not_null(dcc->file);
|
||||
dcc->file = dcc_get_download_path(dcc->arg);
|
||||
|
|
|
|||
|
|
@ -128,8 +128,9 @@ static void dcc_send_connected(SEND_DCC_REC *dcc)
|
|||
that the host of the nick who we sent the request matches the
|
||||
address who connected us. */
|
||||
|
||||
g_source_remove(dcc->tagconn);
|
||||
net_disconnect(dcc->handle);
|
||||
g_source_remove(dcc->tagconn);
|
||||
dcc->tagconn = -1;
|
||||
|
||||
dcc->starttime = time(NULL);
|
||||
dcc->handle = handle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue