types. log buf larger to print packets.

git-svn-id: file:///svn/unbound/trunk@252 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-04-19 15:30:32 +00:00
parent 545feea82b
commit 918858f9c9
2 changed files with 5 additions and 4 deletions

View file

@ -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);
}

View file

@ -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",