mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-24 07:41:10 -04:00
add timeout config option
This commit is contained in:
parent
32b5713530
commit
2881175881
1 changed files with 6 additions and 0 deletions
|
|
@ -31,11 +31,15 @@
|
|||
static void *lwres_malloc(void *, size_t);
|
||||
static void lwres_free(void *, size_t, void *);
|
||||
|
||||
#define LWRES_DEFAULT_TIMEOUT 30 /* 30 seconds for a reply */
|
||||
|
||||
/*
|
||||
* Not all the attributes here are actually settable by the application at
|
||||
* this time.
|
||||
*/
|
||||
struct lwres_context {
|
||||
unsigned int timeout; /* time to wait for reply */
|
||||
|
||||
/*
|
||||
* Function pointers for allocating memory.
|
||||
*/
|
||||
|
|
@ -73,6 +77,8 @@ lwres_contextcreate(lwres_context_t **contextp, void *arg,
|
|||
context->free = free_function;
|
||||
context->arg = arg;
|
||||
|
||||
context->timeout = LWRES_DEFAULT_TIMEOUT;
|
||||
|
||||
*contextp = context;
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue