From: fredrik@DOLDA2000.COM Date: Fri, 29 Apr 2005 02:24:31 +0000 (+0000) Subject: Fixed up printdn. X-Git-Url: http://dolda2000.com/gitweb/?p=icmp-dn.git;a=commitdiff_plain;h=bfd59ca08b91d279b7646d00c209e4bb527f32c6 Fixed up printdn. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/icmp-dn@217 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/idnlookup.c b/idnlookup.c index 43518ef..27b26fd 100644 --- a/idnlookup.c +++ b/idnlookup.c @@ -73,11 +73,13 @@ void printdn(FILE *f, unsigned char *dnbuf, size_t size) fprintf(stderr, "domain name decompression not implemented, aborting\n"); exit(1); } - printf("%.*s.", (int)*p, p + 1); + fprintf(f, "%.*s", (int)*p, p + 1); p += 1 + (int)*p; + if(*p != 0) + fprintf(f, "."); } p++; - printf("\n"); + fprintf(f, "\n"); } }