/[monit]/monit/http/processor.c
ViewVC logotype

Diff of /monit/http/processor.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by hauk, Fri Sep 6 18:13:37 2002 UTC revision 1.8 by hauk, Mon Oct 7 14:30:09 2002 UTC
# Line 73  static void destroy_HttpResponse(HttpRes Line 73  static void destroy_HttpResponse(HttpRes
73  static void destroy_entry(void *);  static void destroy_entry(void *);
74  static void internal_error(int, int, char *);  static void internal_error(int, int, char *);
75  static HttpParameter parse_parameters(char *);  static HttpParameter parse_parameters(char *);
 static int do_timeout(int);  
76  static void request_timeout(int);  static void request_timeout(int);
77    
78    
# Line 122  void *http_processor(void *wrapper) { Line 121  void *http_processor(void *wrapper) {
121        
122    RequestWrapper W= wrapper;    RequestWrapper W= wrapper;
123    
124    if (do_timeout(W->socket))    set_alarm_handler(request_timeout);
125        goto shutdown;    alarm(REQUEST_TIMEOUT);
126    
127      if(sigsetjmp(timeout, TRUE) ) {
128        
129        internal_error(W->socket, SC_REQUEST_TIMEOUT,
130                       "Time out when handling the Request");
131        goto shutdown;
132        
133      }
134            
135    do_service(W);    do_service(W);
136    
# Line 965  static void destroy_entry(void *p) { Line 972  static void destroy_entry(void *p) {
972    
973    
974  /**  /**
  * Activate a timeout alarm clock, set a signal handler to handle the  
  * alarm and a jmp_buffer for handling a timeout.  
  */  
 static int do_timeout(int client) {  
   
   set_alarm_handler(request_timeout);  
     
   alarm(REQUEST_TIMEOUT);  
     
   if ( sigsetjmp(timeout, TRUE) ) {  
       
     internal_error(client, SC_REQUEST_TIMEOUT,  
                    "Time out when handling the Request");  
       
     return TRUE;  
       
   }  
     
   return FALSE;  
     
 }  
   
   
 /**  
975   * Do Basic Authentication if this auth. style is allowed.   * Do Basic Authentication if this auth. style is allowed.
976   */   */
977  static int is_authenticated(HttpRequest req, HttpResponse res) {  static int is_authenticated(HttpRequest req, HttpResponse res) {

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26