Fixed up printdn.
authorfredrik@DOLDA2000.COM <fredrik@DOLDA2000.COM@959494ce-11ee-0310-bf91-de5d638817bd>
Fri, 29 Apr 2005 02:24:31 +0000 (02:24 +0000)
committerfredrik@DOLDA2000.COM <fredrik@DOLDA2000.COM@959494ce-11ee-0310-bf91-de5d638817bd>
Fri, 29 Apr 2005 02:24:31 +0000 (02:24 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/icmp-dn@217 959494ce-11ee-0310-bf91-de5d638817bd

idnlookup.c

index 43518ef..27b26fd 100644 (file)
@@ -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");
     }
 }