diff --git a/lib/lwres/lwres.c b/lib/lwres/lwres.c index 344141c834..90f7d19d9d 100644 --- a/lib/lwres/lwres.c +++ b/lib/lwres/lwres.c @@ -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); }