"dcc error file not found" -> "dcc error file open". Print the actual error

message based on errno, don't just assume the file wasn't found.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1471 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-05-11 12:43:59 +00:00 committed by cras
commit cb28685574
6 changed files with 13 additions and 9 deletions

View file

@ -132,7 +132,8 @@ static void dcc_send_resume(GET_DCC_REC *dcc)
dcc->file = dcc_get_download_path(dcc->arg);
dcc->fhandle = open(dcc->file, O_WRONLY);
if (dcc->fhandle == -1) {
signal_emit("dcc error file not found", 2, dcc, dcc->file);
signal_emit("dcc error file open", 3, dcc->nick, dcc->file,
GINT_TO_POINTER(errno));
return;
}

View file

@ -203,7 +203,8 @@ static void cmd_dcc_send(const char *data, IRC_SERVER_REC *server,
g_free(str);
if (hfile == -1) {
signal_emit("dcc error file not found", 2, target, fname);
signal_emit("dcc error file open", 3, target, fname,
GINT_TO_POINTER(errno));
cmd_params_free(free_arg);
return;
}