Commit 85acbc23 authored by venaas's avatar venaas Committed by venaas

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
parent 6fd042c5
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment