summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-02-15 12:36:05 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-02-15 12:36:05 +0000
commit85acbc23c2678f163fe3ea65fad31a6053f65eab (patch)
tree8ab7553c83c441b36b48fe102a51af317e9be064
parent6fd042c5e1c780facc94a77d4f924921ee6b09a1 (diff)
fixed clientwr bug when receiving new request while not waiting for one
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@59 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index c2c2368..59d207a 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1290,15 +1290,14 @@ void *clientwr(void *arg) {
printf("clientwr: waiting for new request\n");
pthread_cond_wait(&server->newrq_cond, &server->newrq_mutex);
}
- if (server->newrq) {
- printf("clientwr: got new request\n");
- server->newrq = 0;
- }
- } else
+ }
+ if (server->newrq) {
+ printf("clientwr: got new request\n");
server->newrq = 0;
+ } else
+ printf("clientwr: request timer expired, processing request queue\n");
pthread_mutex_unlock(&server->newrq_mutex);
- printf("clientwr: processing request queue\n");
for (i = 0; i < MAX_REQUESTS; i++) {
pthread_mutex_lock(&server->newrq_mutex);
while (!server->requests[i].buf && i < MAX_REQUESTS)