1Index: src/check.c
2===================================================================
3--- src/check.c	2000/09/27 01:33:23	1.1.1.4
4+++ src/check.c	2000/09/27 01:45:04	1.4
5@@ -109,7 +109,7 @@
6
7   DLIST_CHECK(ads->udpw, qu, , {
8     assert(qu->state==query_tosend);
9-    assert(qu->retries <= UDPMAXRETRIES);
10+    assert(qu->retries <= ads->udpmaxretries);
11     assert(qu->udpsent);
12     assert(!qu->children.head && !qu->children.tail);
13     checkc_query(ads,qu);
14Index: src/internal.h
15===================================================================
16--- src/internal.h	2000/09/27 01:33:23	1.1.1.6
17+++ src/internal.h	2000/09/27 01:45:04	1.8
18@@ -288,6 +288,7 @@
19   int nextid, udpsocket, tcpsocket;
20   vbuf tcpsend, tcprecv;
21   int nservers, nsortlist, nsearchlist, searchndots, tcpserver, tcprecv_skip;
22+  int udpmaxretries, udpretryms, tcpms;
23   enum adns__tcpstate {
24     server_disconnected, server_connecting,
25     server_ok, server_broken
26Index: src/setup.c
27===================================================================
28--- src/setup.c	2000/09/27 01:33:23	1.1.1.5
29+++ src/setup.c	2000/09/27 01:45:04	1.9
30@@ -227,6 +227,7 @@
31       ads->iflags |= adns_if_debug;
32       continue;
33     }
34+
35     if (l>=6 && !memcmp(word,"ndots:",6)) {
36       v= strtoul(word+6,&ep,10);
37       if (l==6 || ep != word+l || v > INT_MAX) {
38@@ -236,6 +237,37 @@
39       ads->searchndots= v;
40       continue;
41     }
42+
43+    if (l>=14 && !memcmp(word,"udpmaxretries:",14)) {
44+      v= strtoul(word+14,&ep,10);
45+      if (l==14 || ep != word+l || v > INT_MAX) {
46+	configparseerr(ads,fn,lno,"option `%.*s' malformed or has bad value",l,word);
47+	continue;
48+      }
49+      ads->udpmaxretries= v;
50+      continue;
51+    }
52+
53+    if (l>=11 && !memcmp(word,"udpretryms:",11)) {
54+      v= strtoul(word+11,&ep,10);
55+      if (l==11 || ep != word+l || v > INT_MAX) {
56+	configparseerr(ads,fn,lno,"option `%.*s' malformed or has bad value",l,word);
57+	continue;
58+      }
59+      ads->udpretryms= v;
60+      continue;
61+    }
62+
63+    if (l>=6 && !memcmp(word,"tcpms:",6)) {
64+      v= strtoul(word+6,&ep,10);
65+      if (l==6 || ep != word+l || v > INT_MAX) {
66+	configparseerr(ads,fn,lno,"option `%.*s' malformed or has bad value",l,word);
67+	continue;
68+      }
69+      ads->tcpms= v;
70+      continue;
71+    }
72+
73     if (l>=12 && !memcmp(word,"adns_checkc:",12)) {
74       if (!strcmp(word+12,"none")) {
75 	ads->iflags &= ~adns_if_checkc_freq;
76@@ -251,6 +283,7 @@
77       }
78       continue;
79     }
80+
81     adns__diag(ads,-1,0,"%s:%d: unknown option `%.*s'", fn,lno, l,word);
82   }
83 }
84@@ -478,6 +511,9 @@
85   adns__vbuf_init(&ads->tcprecv);
86   ads->tcprecv_skip= 0;
87   ads->nservers= ads->nsortlist= ads->nsearchlist= ads->tcpserver= 0;
88+  ads->udpmaxretries = UDPMAXRETRIES;
89+  ads->udpretryms = UDPRETRYMS;
90+  ads->tcpms = TCPWAITMS;
91   ads->searchndots= 1;
92   ads->tcpstate= server_disconnected;
93   timerclear(&ads->tcptimeout);
94Index: src/transmit.c
95===================================================================
96--- src/transmit.c	2000/09/27 01:33:23	1.1.1.6
97+++ src/transmit.c	2000/09/27 01:45:04	1.9
98@@ -215,7 +215,7 @@
99 static void query_usetcp(adns_query qu, struct timeval now) {
100   qu->state= query_tcpw;
101   qu->timeout= now;
102-  timevaladd(&qu->timeout,TCPWAITMS);
103+  timevaladd(&qu->timeout,qu->ads->tcpms);
104   LIST_LINK_TAIL(qu->ads->tcpw,qu);
105   adns__querysend_tcp(qu,now);
106   adns__tcp_tryconnect(qu->ads,now);
107@@ -232,7 +232,8 @@
108     return;
109   }
110
111-  if (qu->retries >= UDPMAXRETRIES) {
112+  ads= qu->ads;
113+  if (qu->retries >= ads->udpmaxretries) {
114     adns__query_fail(qu,adns_s_timeout);
115     return;
116   }
117@@ -240,7 +241,6 @@
118   serv= qu->udpnextserver;
119   memset(&servaddr,0,sizeof(servaddr));
120
121-  ads= qu->ads;
122   servaddr.sin_family= AF_INET;
123   servaddr.sin_addr= ads->servers[serv].addr;
124   servaddr.sin_port= htons(DNS_PORT);
125@@ -251,7 +251,7 @@
126   if (r<0 && errno != EAGAIN) adns__warn(ads,serv,0,"sendto failed: %s",strerror(errno));
127
128   qu->timeout= now;
129-  timevaladd(&qu->timeout,UDPRETRYMS);
130+  timevaladd(&qu->timeout,ads->udpretryms);
131   qu->udpsent |= (1<<serv);
132   qu->udpnextserver= (serv+1)%ads->nservers;
133   qu->retries++;
134Index: dynamic/Makefile.in
135===================================================================
136--- dynamic/Makefile.in	2000/09/27 01:33:22	1.1.1.5
137+++ dynamic/Makefile.in	2000/09/27 03:36:37	1.2
138@@ -33,6 +33,7 @@
139 install:
140 		$(INSTALL_PROGRAM) $(SHLIBFILE) $(lib_dir)/$(SHLIBFILE)
141 		ln -sf $(SHLIBFILE) $(lib_dir)/$(SHLIBSONAME)
142+		ln -sf $(SHLIBFILE) $(lib_dir)/$(SHLIBFORLINK)
143
144 uninstall:
145 		rm -f $(lib_dir)/$(SHLIBFILE) $(lib_dir)/$(SHLIBSONAME)
146