Hi!
While trying to configure the resolver retries I ran into something
interesting. As I understand it, the following definition in sres.h should
decide how long we wait for the first DNS query:
/** Initial retry interval in seconds. */
SRES_RETRY_INTERVAL = 1,
The only place where this definition is used is in sres_parse_config:
/* Default values */
c->c_opt.ndots = 1;
c->c_opt.check_names = 1;
c->c_opt.timeout = SRES_RETRY_INTERVAL;
This timeout struct member is only used in one other place, namely in
sres_parse_options:
else if (MATCH("timeout:")) c->c_opt.timeout = n;
So we can configure it but it's never used!? What really determines the length
of the timeout seems to be the following line in sres_resolver_timer:
/* Exponential backoff */
retry_time = q->q_timestamp + ((time_t)1 << q->q_retry_count);
As I understand it the initial retry interval is really hardcoded to 1 second.
I believe that this should be replaced by:
/* Exponential backoff */
retry_time = q->q_timestamp + ((time_t)res->res_config->c_opt.timeout <<
q->q_retry_count);
Or am I missing something?
Best regards,
Björn Stenborg
------------------------------------------------------------------------------
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel