]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
types. log buf larger to print packets.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Apr 2007 15:30:32 +0000 (15:30 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Apr 2007 15:30:32 +0000 (15:30 +0000)
git-svn-id: file:///svn/unbound/trunk@252 be551aaa-1e26-0410-a405-d3ace91eadb9

testcode/unitmsgparse.c
util/log.c

index eb7887125289ce5e662176bdfd337c0350e0420b..48ddcb8d2e482cab6fe7ce76e1409b4e3f9965b1 100644 (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);
        } 
 
index 9fb35fcdc058744029be08c5186cc225c8d8e29d..c9bfdd60aab4034e9cb6a8fb3bd5666827ee118c 100644 (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",