}
rq = server->requests + i;
- from = rq->from;
pthread_mutex_lock(&server->newrq_mutex);
if (!rq->buf || !rq->tries) {
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");
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;