Stop earlier if something went wrong
authoraland <aland>
Fri, 21 Oct 2005 18:29:07 +0000 (18:29 +0000)
committeraland <aland>
Fri, 21 Oct 2005 18:29:07 +0000 (18:29 +0000)
src/main/request_process.c

index 2f7c758..25a14a4 100755 (executable)
@@ -272,11 +272,6 @@ static const LRAD_NAME_NUMBER request_fail_reason[] = {
                       request->number,
                       request->module ? request->module : "<server core>",
                       request->component ? request->component : "<server core>");
-
-               /*
-                *      Tell the server to stop processing the request
-                */
-               request->options |= RAD_REQUEST_OPTION_STOP_NOW;
                break;
 
        default:                /* no additional messages, or things to do */
@@ -458,6 +453,15 @@ int rad_respond(REQUEST *request, RAD_REQUEST_FUNP fun)
         *      If the request took too long to process, don't do
         *      anything else.
         */
+       if (request->options & RAD_REQUEST_OPTION_STOP_NOW) {
+               finished = TRUE;
+               goto postpone_request;
+       }
+
+       /*
+        *      If the request took too long to process, don't do
+        *      anything else.
+        */
        if (request->options & RAD_REQUEST_OPTION_REJECTED) {
                finished = TRUE;
                goto postpone_request;