summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorvenaas <venaas>2008-04-14 10:56:08 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-04-14 10:56:08 +0000
commitaeb7a66bfcb5ac292c4c22b7157c5b05ba4dbba8 (patch)
tree5d17175c1f86efbb07c491aa04c2868f9ac54e74 /radsecproxy.c
parent9efa0f4fa46558f4f3d1cfe90ddaa32e4c570eeb (diff)
moved null client check to after status server
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@227 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 1178273..705b83c 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1830,7 +1830,6 @@ int replyh(struct server *server, unsigned char *buf) {
}
rq = server->requests + i;
- from = rq->from;
pthread_mutex_lock(&server->newrq_mutex);
if (!rq->buf || !rq->tries) {
@@ -1839,12 +1838,6 @@ int replyh(struct server *server, unsigned char *buf) {
return 0;
}
- if (!from) {
- pthread_mutex_unlock(&server->newrq_mutex);
- debug(DBG_INFO, "replyh: client gone, ignoring reply");
- return 0;
- }
-
if (rq->received) {
pthread_mutex_unlock(&server->newrq_mutex);
debug(DBG_INFO, "replyh: already received, ignoring reply");
@@ -1892,6 +1885,13 @@ int replyh(struct server *server, unsigned char *buf) {
return 0;
}
+ from = rq->from;
+ if (!from) {
+ pthread_mutex_unlock(&server->newrq_mutex);
+ debug(DBG_INFO, "replyh: client gone, ignoring reply");
+ return 0;
+ }
+
if (server->conf->rewrite) {
dorewrite(buf, server->conf->rewrite);
len = RADLEN(buf) - 20;