small patch to make nsd-notify increase timeout from a small value

--- nsd-3.0.4/nsd-notify.c 2006-09-01 23:22:14.000000000 +0200
+++ nsd-test/nsd-notify.c 2007-01-27 16:17:42.000000000 +0100
@@ -69,8 +69,8 @@
notify_host(int udp_s, struct query* q, struct query *answer,
        struct addrinfo* res, const char* addrstr)
{
- int timeout_retry = 5; /* seconds */
- int num_retry = 15; /* times to try */
+ int timeout_retry = 1; /* seconds */
+ int num_retry = 6; /* times to try */
        fd_set rfds;
        struct timeval tv;
        int retval = 0;
@@ -115,6 +115,7 @@
                if (retval == 1) {
                        got_ack = 1;
                }
+ timeout_retry = timeout_retry*2;
        }

        /* receive reply */

Result:

rasmus:~/src/nsd-3.0.1 mansaxel$ ./nsd-notify -z namn.se 169.254.47.12
[1169911073] nsd-notify[5644]: warning: timeout (1 s) expired, retry notify
to 169.254.47.12.
[1169911075] nsd-notify[5644]: warning: timeout (2 s) expired, retry notify
to 169.254.47.12.
[1169911079] nsd-notify[5644]: warning: timeout (4 s) expired, retry notify
to 169.254.47.12.
[1169911087] nsd-notify[5644]: warning: timeout (8 s) expired, retry notify
to 169.254.47.12.
[1169911103] nsd-notify[5644]: warning: timeout (16 s) expired, retry
notify to 169.254.47.12.
[1169911135] nsd-notify[5644]: warning: error: failed to send notify to
169.254.47.12.

I think, after very brief testing, that this is nicer to wait for than 15*5
seconds.

Hi Måns,

Good suggestion, thanks.

The change has been committed to svn and will be part of the next release.

Regards,

Mark