From 2881175881356bccca0702fe8490325acc692306 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Wed, 12 Jan 2000 00:48:03 +0000 Subject: [PATCH] add timeout config option --- lib/lwres/lwres.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); }