From: Wouter Wijngaards Date: Thu, 19 Apr 2007 15:30:32 +0000 (+0000) Subject: types. log buf larger to print packets. X-Git-Tag: release-0.3~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=918858f9c9334d9992eafa0b2d63bcdb99c3446e;p=thirdparty%2Funbound.git types. log buf larger to print packets. git-svn-id: file:///svn/unbound/trunk@252 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/testcode/unitmsgparse.c b/testcode/unitmsgparse.c index eb7887125..48ddcb8d2 100644 --- a/testcode/unitmsgparse.c +++ b/testcode/unitmsgparse.c @@ -178,8 +178,8 @@ test_buffers(ldns_buffer* pkt, ldns_buffer* out) if(ldns_buffer_limit(pkt) == ldns_buffer_limit(out) && memcmp(ldns_buffer_begin(pkt), ldns_buffer_begin(out), ldns_buffer_limit(pkt)) == 0) { - if(1) printf("binary the same (length=%d)\n", - ldns_buffer_limit(pkt)); + if(1) printf("binary the same (length=%u)\n", + (unsigned)ldns_buffer_limit(pkt)); return 1; } /* check if it 'means the same' */ @@ -261,7 +261,8 @@ testpkt(ldns_buffer* pkt, struct alloc_cache* alloc, ldns_buffer* out, timenow, region); unit_assert(sz != 0); /* udp packets should fit in 1024 iov */ write_iov_buffer(out, iov, sz); - printf("iov len outlen %d %d\n", sz, ldns_buffer_limit(out)); + printf("iov len outlen %u %u\n", (unsigned)sz, + (unsigned)ldns_buffer_limit(out)); test_buffers(pkt, out); } diff --git a/util/log.c b/util/log.c index 9fb35fcdc..c9bfdd60a 100644 --- a/util/log.c +++ b/util/log.c @@ -95,7 +95,7 @@ void log_ident_set(const char* id) void log_vmsg(const char* type, const char *format, va_list args) { - char message[MAXSYSLOGMSGLEN]; + char message[MAXSYSLOGMSGLEN * 10]; unsigned int* tid = (unsigned int*)ub_thread_key_get(logkey); vsnprintf(message, sizeof(message), format, args); fprintf(logfile, "[%d] %s[%d:%x] %s: %s\n",