From: Wilfried Göesgens Date: Sat, 20 Feb 2010 11:53:27 +0000 (+0000) Subject: * debug output for BLOB reading too. X-Git-Tag: v7.86~411 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=afa0188bfdaeb8e08df8acca5014bdd9a16a5888;p=citadel.git * debug output for BLOB reading too. --- diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 416fc7b89..28104218c 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -588,6 +588,23 @@ int client_read_blob(StrBuf *Target, int bytes, int timeout) __FUNCTION__, Error); } + else + { + char fn [SIZ]; + FILE *fd; + + snprintf(fn, SIZ, "/tmp/foolog_%s.%d", CCC->ServiceName, CCC->cs_pid); + + fd = fopen(fn, "a+"); + fprintf(fd, "Read: BufSize: %d BufContent: [", + StrLength(Target)); + fwrite(ChrPtr(Target), StrLength(Target), 1, fd); + fprintf(fd, "]\n"); + + + fclose(fd); + + } return retval == bytes; }