From afa0188bfdaeb8e08df8acca5014bdd9a16a5888 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sat, 20 Feb 2010 11:53:27 +0000 Subject: [PATCH] * debug output for BLOB reading too. --- citadel/sysdep.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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; } -- 2.39.2