From: Russell Bryant Date: Tue, 21 Dec 2004 19:56:43 +0000 (+0000) Subject: Add errno (bug #3063) X-Git-Tag: 1.0.11.1~331 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10bbbf2c14f28f12302e0eacfba9e52b2fddfbf1;p=thirdparty%2Fasterisk.git Add errno (bug #3063) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4513 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c index 95598bd52b..bd18a77753 100755 --- a/cdr/cdr_csv.c +++ b/cdr/cdr_csv.c @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -218,7 +219,7 @@ static int csv_log(struct ast_cdr *cdr) we open write and close the log file each time */ mf = fopen(csvmaster, "a"); if (!mf) { - ast_log(LOG_ERROR, "Unable to re-open master file %s\n", csvmaster); + ast_log(LOG_ERROR, "Unable to re-open master file %s : %s\n", csvmaster, strerror(errno)); } if (mf) { fputs(buf, mf); @@ -228,7 +229,7 @@ static int csv_log(struct ast_cdr *cdr) } if (!ast_strlen_zero(cdr->accountcode)) { if (writefile(buf, cdr->accountcode)) - ast_log(LOG_WARNING, "Unable to write CSV record to account file '%s'\n", cdr->accountcode); + ast_log(LOG_WARNING, "Unable to write CSV record to account file '%s' : %s\n", cdr->accountcode, strerror(errno)); } } return 0;