3 kHTTPd -- the next generation
5 logging.c takes care of shutting down a connection.
8 /****************************************************************
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 ****************************************************************/
25 #include <linux/kernel.h>
26 #include <linux/skbuff.h>
27 #include <linux/smp_lock.h>
29 #include <asm/uaccess.h>
30 #include "structure.h"
31 #include "prototypes.h"
37 Logging() terminates "finished" connections and will eventually log them to a
41 The number of requests that changed status, thus the number of connections
46 int Logging(const int CPUNR
)
48 struct http_request
*CurrentRequest
,*Req
;
51 EnterFunction("Logging");
53 CurrentRequest
= threadinfo
[CPUNR
].LoggingQueue
;
55 /* For now, all requests are removed immediatly, but this changes
56 when userspace-logging is added. */
58 while (CurrentRequest
!=NULL
)
61 Req
= CurrentRequest
->Next
;
63 CleanUpRequest(CurrentRequest
);
65 threadinfo
[CPUNR
].LoggingQueue
= Req
;
73 LeaveFunction("Logging");
79 void StopLogging(const int CPUNR
)
81 struct http_request
*CurrentRequest
,*Next
;
83 EnterFunction("StopLogging");
84 CurrentRequest
= threadinfo
[CPUNR
].LoggingQueue
;
86 while (CurrentRequest
!=NULL
)
88 Next
=CurrentRequest
->Next
;
89 CleanUpRequest(CurrentRequest
);
93 threadinfo
[CPUNR
].LoggingQueue
= NULL
;
94 LeaveFunction("StopLogging");