Skip to content

Commit

Permalink
Don't check synchronous / nodup for detail sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Oct 7, 2014
1 parent 326c060 commit 54c9a55
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/main/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1568,19 +1568,20 @@ int request_receive(rad_listen_t *listener, RADIUS_PACKET *packet,
*/
gettimeofday(&now, NULL);

packet->timestamp = now;

#ifdef WITH_ACCOUNTING
if (listener->type != RAD_LISTEN_DETAIL)
#endif
{
sock = listener->data;
sock->last_packet = now.tv_sec;
}
packet->timestamp = now;

/*
* Skip everything if required.
*/
if (listener->nodup) goto skip_dup;
/*
* Skip everything if required.
*/
if (listener->nodup) goto skip_dup;
}

packet_p = rbtree_finddata(pl, &packet);
if (packet_p) {
Expand Down Expand Up @@ -1686,6 +1687,10 @@ int request_receive(rad_listen_t *listener, RADIUS_PACKET *packet,
request = request_setup(listener, packet, client, fun);
if (!request) return 1;

#ifdef WITH_ACCOUNTING
if (listener->type == RAD_LISTEN_DETAIL) goto do_queue_or_run;
#endif

/*
* Remember the request in the list.
*/
Expand Down Expand Up @@ -1718,6 +1723,7 @@ int request_receive(rad_listen_t *listener, RADIUS_PACKET *packet,
return 1;
}

do_queue_or_run:
/*
* Otherwise, insert it into the state machine.
* The child threads will take care of processing it.
Expand Down

0 comments on commit 54c9a55

Please sign in to comment.