Re-ordered RAD_LISTEN_TYPE by priority, and added "priority"
authoraland <aland>
Mon, 23 Apr 2007 12:29:33 +0000 (12:29 +0000)
committeraland <aland>
Mon, 23 Apr 2007 12:29:33 +0000 (12:29 +0000)
commit2ae7944e24012c9895bd60674427477d5ca12aea
tree41b979ab755386751ce507fea0907dbb81606c0d
parent64951cdd58a520ff72aa1028524c5d39564f6ad9
Re-ordered RAD_LISTEN_TYPE by priority, and added "priority"
field to the REQUEST.

Updated threads to have RAD_LISTEN_TYPE_MAX fifo's, and to insert
REQUEST's into the appropriate fifo.  Then, when pulling requests
from the queue, we pull from high priority to low, and starve
any lower priority queues.  This should make the server more robust
in high load situations.

i.e. we handle responses from home servers first, then authentication
requests, then accounting requests (because the NAS will retransmit
them), then the "detail" file, and finally SNMP.

We haven't integrated SNMP sockets into this scheme yet, but the
idea will work.  We also need to update the code so that it doesn't
even look at a socket if there are pending requests.

i.e. if all the threads are busy, AND fifo N has entries, then do
NOT look at sockets associated with priorities N+1 and following.
src/include/radiusd.h
src/main/event.c
src/main/threads.c