diff options
author | rsc <devnull@localhost> | 2006-02-24 17:40:15 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-02-24 17:40:15 +0000 |
commit | b7f150b09e424e64a7234bfebfe5d1a181faafad (patch) | |
tree | 7a97734f9ea3160ded80cd72595381f58dc11af9 /src/cmd/ndb | |
parent | c7a7e3c44dd1e65d88bccb07bd93fc22a68ed33b (diff) | |
download | plan9port-b7f150b09e424e64a7234bfebfe5d1a181faafad.tar.gz plan9port-b7f150b09e424e64a7234bfebfe5d1a181faafad.tar.bz2 plan9port-b7f150b09e424e64a7234bfebfe5d1a181faafad.zip |
use domain as the port
Diffstat (limited to 'src/cmd/ndb')
-rwxr-xr-x | src/cmd/ndb/dns.c | 8 | ||||
-rw-r--r-- | src/cmd/ndb/dntcpserver.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/ndb/dns.c b/src/cmd/ndb/dns.c index 31da9dba..c60a574d 100755 --- a/src/cmd/ndb/dns.c +++ b/src/cmd/ndb/dns.c @@ -96,8 +96,8 @@ Job* newjob(void); void freejob(Job*); void setext(char*, int, char*); -char *tcpaddr = "tcp!*!dns"; -char *udpaddr = "udp!*!dns"; +char *tcpaddr = "tcp!*!domain"; +char *udpaddr = "udp!*!domain"; char *logfile = "dns"; char *dbfile; char mntpt[Maxpath]; @@ -162,10 +162,10 @@ threadmain(int argc, char *argv[]) sendnotifies = 1; break; case 'U': - udpaddr = estrdup(netmkaddr(EARGF(usage()), "udp", "dns")); + udpaddr = estrdup(netmkaddr(EARGF(usage()), "udp", "domain")); break; case 'T': - tcpaddr = estrdup(netmkaddr(EARGF(usage()), "tcp", "dns")); + tcpaddr = estrdup(netmkaddr(EARGF(usage()), "tcp", "domain")); break; default: usage(); diff --git a/src/cmd/ndb/dntcpserver.c b/src/cmd/ndb/dntcpserver.c index 59d0e04b..017ab764 100644 --- a/src/cmd/ndb/dntcpserver.c +++ b/src/cmd/ndb/dntcpserver.c @@ -200,8 +200,6 @@ tcpproc(void *v) close(rfd); now = time(0); memset(&repmsg, 0, sizeof(repmsg)); - freenetconninfo(caller); - caller = getnetconninfo(0, fd); if (fd == 0) { len = readmsg(fd, buf, sizeof buf); rfd = 1; @@ -210,6 +208,8 @@ tcpproc(void *v) } if(len <= 0) continue; + freenetconninfo(caller); + caller = getnetconninfo(0, fd); getactivity(&req); req.aborttime = now + 15*Min; err = convM2DNS(buf, len, &reqmsg); |