diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-07-12 14:58:26 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-07-12 14:58:26 +0000 |
commit | 1af2272920c64fe8ed463eea9475dc18058bf4ad (patch) | |
tree | 4e843581d478cefb01ad412799da38c38a931af1 /src/myfprintf.c | |
parent | 25c923809a558583e798cac159fc668f1d8601cc (diff) | |
download | mpd-1af2272920c64fe8ed463eea9475dc18058bf4ad.tar.gz mpd-1af2272920c64fe8ed463eea9475dc18058bf4ad.tar.xz mpd-1af2272920c64fe8ed463eea9475dc18058bf4ad.zip |
potential fixes for NHI\'s bugs
git-svn-id: https://svn.musicpd.org/mpd/trunk@1848 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/myfprintf.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/myfprintf.c b/src/myfprintf.c index e2c366a1d..e73f307f9 100644 --- a/src/myfprintf.c +++ b/src/myfprintf.c @@ -74,13 +74,15 @@ void myfprintf(FILE * fp, char * format, ... ) { memset(buffer,0,BUFFER_LENGTH+1); va_start(arglist,format); - if(myfprintf_stdLogMode && (fd==1 || fd==2)) { - time_t t = time(NULL); - if(fd==1) fp = myfprintf_out; - else fp = myfprintf_err; - strftime(buffer,14,"%b %e %R",localtime(&t)); - blockingWrite(fd,buffer,strlen(buffer)); - blockingWrite(fd," : ",3); + if(fd==1 || fd==2) { + if(myfprintf_stdLogMode) { + time_t t = time(NULL); + if(fd==1) fp = myfprintf_out; + else fp = myfprintf_err; + strftime(buffer,14,"%b %e %R",localtime(&t)); + blockingWrite(fd,buffer,strlen(buffer)); + blockingWrite(fd," : ",3); + } vsnprintf(buffer,BUFFER_LENGTH,format,arglist); blockingWrite(fd,buffer,strlen(buffer)); } |