X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/adns/blobdiff_plain/ac77ffc12405483a2b65ec2b27006426719113aa..1ec6769606f155e156ecbe1a69b97ecd89bbdb7c:/src/general.c?ds=inline diff --git a/src/general.c b/src/general.c index ae7cac0..0d159df 100644 --- a/src/general.c +++ b/src/general.c @@ -5,11 +5,11 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1997-2000 Ian Jackson + * Copyright (C) 1999-2000 Tony Finch * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +27,7 @@ */ #include +#include #include #include @@ -46,7 +47,11 @@ void adns__vdiag(adns_state ads, const char *pfx, adns_initflags prevent, (!(ads->iflags & adns_if_debug) && (!prevent || (ads->iflags & prevent)))) return; - fprintf(ads->diagfile,"adns%s: ",pfx); + if (ads->iflags & adns_if_logpid) { + fprintf(ads->diagfile,"adns%s [%ld]: ",pfx,(long)getpid()); + } else { + fprintf(ads->diagfile,"adns%s: ",pfx); + } vfprintf(ads->diagfile,fmt,al); @@ -63,6 +68,7 @@ void adns__vdiag(adns_state ads, const char *pfx, adns_initflags prevent, if (qu->typei && qu->typei->fmtname) fprintf(ads->diagfile,"(%s)",qu->typei->fmtname); bef=", "; aft=")\n"; + adns__vbuf_free(&vb); } if (serv>=0) { @@ -238,7 +244,7 @@ static const struct sinfo { SINFO( querydomainwrong, "Domain invalid for particular DNS query type" ), SINFO( querydomaininvalid, "Domain name is syntactically invalid" ), - SINFO( querydomaintoolong, "Domain name is too long" ), + SINFO( querydomaintoolong, "Domain name or component is too long" ), SINFO( nxdomain, "No such domain" ), SINFO( nodata, "No such data" )