Commit 6fd042c5 authored by venaas's avatar venaas Committed by venaas
Browse files

fixed clientwr bug when receiving new request while not waiting for one

git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@58 e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent d5fef766
CFLAGS = -g -Wall -pedantic -pthread
LDFLAGS = -lssl
OBJ = util.o
OBJ = util.o radsecproxy.o
all: radsecproxy
radsecproxy: $(OBJ)
$(CC) $(CFLAGS) $(OBJ) $(LDFLAGS) -o radsecproxy radsecproxy.c
radsecproxy: $(OBJ) radsecproxy.o
$(CC) $(CFLAGS) $(OBJ) $(LDFLAGS) -o radsecproxy
clean:
rm -f $(OBJ) radsecproxy
......@@ -1294,9 +1294,11 @@ void *clientwr(void *arg) {
printf("clientwr: got new request\n");
server->newrq = 0;
}
}
} else
server->newrq = 0;
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)
......
Supports Markdown
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