This commit is contained in:
rsc 2006-02-15 18:37:21 +00:00
parent 27b457ae8a
commit aa01e1feaf
3 changed files with 13 additions and 6 deletions

View file

@ -47,6 +47,7 @@ usage(void)
fprint(2, "usage: dnsdebug -rxf [-p port] [query ...]\n");
threadexitsall("usage");
}
char *portname = "domain";
void
threadmain(int argc, char *argv[])
@ -323,7 +324,6 @@ squirrelserveraddrs(void)
l = &(*l)->next;
continue;
}
req.isslave = 1;
req.aborttime = now + 60; /* don't spend more than 60 seconds */
*l = dnresolve(rp->host->name, Cin, Ta, &req, 0, 0, Recurse, 0, 0);
while(*l != nil)
@ -427,7 +427,6 @@ doquery(char *name, char *tstr)
}
getactivity(&req);
req.isslave = 1;
req.aborttime = now + 60; /* don't spend more than 60 seconds */
rr = dnresolve(buf, Cin, type, &req, 0, 0, Recurse, rooted, 0);
if(rr){

View file

@ -3,6 +3,7 @@
#include <bio.h>
#include <ndb.h>
#include <thread.h>
#include <9pclient.h>
#include "dns.h"
#include "ip.h"
@ -14,9 +15,8 @@ usage(void)
}
void
main(int argc, char *argv[])
threadmain(int argc, char *argv[])
{
char *dns;
CFid *fd;
int n, len;
Biobuf in;

View file

@ -27,11 +27,16 @@ char *LOG;
char *zonerefreshprogram;
char *portname = "domain";
void
usage(void)
{
fprint(2, "usage: dnstcp [-dr] [-f dbfile]\n");
threadexitsall("usage");
}
void
threadmain(int argc, char *argv[])
{
char *ext = "";
ARGBEGIN{
default:
usage();
@ -46,6 +51,9 @@ threadmain(int argc, char *argv[])
break;
}ARGEND
if(argc)
usage();
if(debug < 2)
debug = 0;