diff options
author | Timo Sirainen <cras@irssi.org> | 2001-02-03 17:38:01 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-02-03 17:38:01 +0000 |
commit | 6ad5d24e0d3d364fc0f74e3f3218e26bf331b998 (patch) | |
tree | febccfabb6b95ae2bc5d94645c0e6773f428c1c0 /src/irc/dcc/dcc-get.c | |
parent | e3875169515c0b571c90b914f16327835eb47105 (diff) | |
download | irssi-6ad5d24e0d3d364fc0f74e3f3218e26bf331b998.zip |
DCC RESUME, DCC ACCEPT: we might have crashed with invalid parameters.
Some other "cleanups".
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1178 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/dcc/dcc-get.c')
-rw-r--r-- | src/irc/dcc/dcc-get.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c index 0ebf3e20..36da43f4 100644 --- a/src/irc/dcc/dcc-get.c +++ b/src/irc/dcc/dcc-get.c @@ -176,9 +176,11 @@ static void sig_dccget_connected(DCC_REC *dcc) } if (dcc->get_type != DCC_GET_RESUME) { - dcc->fhandle = open(dcc->file, O_WRONLY | O_TRUNC | O_CREAT, dcc_file_create_mode); + dcc->fhandle = open(dcc->file, O_WRONLY | O_TRUNC | O_CREAT, + dcc_file_create_mode); if (dcc->fhandle == -1) { - signal_emit("dcc error file create", 2, dcc, dcc->file); + signal_emit("dcc error file create", 2, + dcc, dcc->file); dcc_destroy(dcc); return; } @@ -205,9 +207,11 @@ void dcc_get_connect(DCC_REC *dcc) dcc->handle = net_connect_ip(&dcc->addr, dcc->port, source_host_ok ? source_host_ip : NULL); if (dcc->handle != NULL) { - dcc->tagconn = g_input_add(dcc->handle, - G_INPUT_WRITE | G_INPUT_READ, - (GInputFunction) sig_dccget_connected, dcc); + dcc->tagconn = + g_input_add(dcc->handle, + G_INPUT_WRITE | G_INPUT_READ, + (GInputFunction) sig_dccget_connected, + dcc); } else { /* error connecting */ signal_emit("dcc error connect", 1, dcc); |