chiark
/
gitweb
/
~mdw
/
adns
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
+ * Added wishlist entry re configurable port no.
[adns]
/
src
/
general.c
diff --git
a/src/general.c
b/src/general.c
index ae7cac0f2b06910c7ece07346208e42788a28e21..0d159df18c8129464d27853651df1e4977b9840e 100644
(file)
--- a/
src/general.c
+++ b/
src/general.c
@@
-5,11
+5,11
@@
*/
/*
* This file is
*/
/*
* This file is
- * Copyright (C) 1997-
1999
Ian Jackson <ian@davenant.greenend.org.uk>
+ * Copyright (C) 1997-
2000
Ian Jackson <ian@davenant.greenend.org.uk>
*
* It is part of adns, which is
*
* It is part of adns, which is
- * Copyright (C) 1997-
1999
Ian Jackson <ian@davenant.greenend.org.uk>
- * Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ * Copyright (C) 1997-
2000
Ian Jackson <ian@davenant.greenend.org.uk>
+ * Copyright (C) 1999
-2000
Tony Finch <dot@dotat.at>
*
* 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
*
* 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 <stdlib.h>
*/
#include <stdlib.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
@@
-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;
(!(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);
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";
if (qu->typei && qu->typei->fmtname)
fprintf(ads->diagfile,"(%s)",qu->typei->fmtname);
bef=", "; aft=")\n";
+ adns__vbuf_free(&vb);
}
if (serv>=0) {
}
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( 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" )
SINFO( nxdomain, "No such domain" ),
SINFO( nodata, "No such data" )