httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@hyperreal.org
Subject cvs commit: apache-apr/pthreads/src/modules/proxy proxy_cache.c proxy_ftp.c
Date Mon, 22 Mar 1999 20:43:42 GMT
rbb         99/03/22 12:43:41

  Modified:    pthreads/src/modules/proxy proxy_cache.c proxy_ftp.c
  Log:
  Amazingly enough, mod_proxy seems to work.  I had to remove all of the
  ap_(un)block_alarms calls, but that should be okay, because our sig_wait
  thread should handle all of that stuff for us.  This needs to be tested
  more thoroughly, but it seemed to work for me.
  
  Revision  Changes    Path
  1.6       +1 -9      apache-apr/pthreads/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/pthreads/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- proxy_cache.c	1999/03/17 17:01:42	1.5
  +++ proxy_cache.c	1999/03/22 20:43:39	1.6
  @@ -137,13 +137,11 @@
   	inside = 1;
       (void) ap_release_mutex(garbage_mutex);
   
  -    ap_block_alarms();		/* avoid SIGALRM on big cache cleanup */
   #if !defined(WIN32) && !defined(MPE) && !defined(OS2)
       detached_proxy_garbage_coll(r);
   #else
       help_proxy_garbage_coll(r);
   #endif
  -    ap_unblock_alarms();
   
       (void) ap_acquire_mutex(garbage_mutex);
       inside = 0;
  @@ -294,7 +292,6 @@
       if (garbage_now != -1 && lastcheck != BAD_DATE && garbage_now <
lastcheck + every)
   	return;
   
  -    ap_block_alarms();		/* avoid SIGALRM on big cache cleanup */
   
       filename = ap_palloc(r->pool, strlen(cachedir) + HASH_LEN + 2);
       strcpy(filename, cachedir);
  @@ -303,7 +300,6 @@
   	if (errno != ENOENT) {
   	    ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
   			 "proxy: stat(%s)", filename);
  -	    ap_unblock_alarms();
   	    return;
   	}
   	if ((timefd = creat(filename, 0666)) == -1) {
  @@ -312,7 +308,6 @@
   			     "proxy: creat(%s)", filename);
   	    else
   		lastcheck = garbage_now;	/* someone else got in there */
  -	    ap_unblock_alarms();
   	    return;
   	}
   	close(timefd);
  @@ -320,7 +315,6 @@
       else {
   	lastcheck = buf.st_mtime;	/* save the time */
   	if (garbage_now < lastcheck + every) {
  -	    ap_unblock_alarms();
   	    return;
   	}
   	if (utime(filename, NULL) == -1)
  @@ -336,7 +330,6 @@
   	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
   			 "proxy GC: Cache is %ld%% full (nothing deleted)",
   			 (long)(((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space));
  -	ap_unblock_alarms();
   	return;
       }
   
  @@ -367,7 +360,6 @@
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
   			 "proxy GC: Cache is %ld%% full (%d deleted)",
   			 (long)(((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space),
i);
  -    ap_unblock_alarms();
   }
   
   static int sub_garbage_coll(request_rec *r, array_header *files,
  @@ -954,7 +946,7 @@
   	    r->status_line = strchr(c->resp_line, ' ') + 1;
   	    r->status = c->status;
   	    if (!r->assbackwards) {
  -		ap_soft_timeout("proxy send headers", r);
  +		/*ap_soft_timeout("proxy send headers", r);*/
   		ap_proxy_send_headers(r, c->resp_line, c->hdrs);
   	    }
   	    ap_bsetopt(r->connection->client, BO_BYTECT, &zero);
  
  
  
  1.5       +1 -1      apache-apr/pthreads/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/pthreads/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- proxy_ftp.c	1999/03/17 17:01:43	1.4
  +++ proxy_ftp.c	1999/03/22 20:43:39	1.5
  @@ -660,7 +660,7 @@
       i = ftp_getrc(f);
       Explain1("FTP: returned status %d", i);
       if (i == -1) {
  -	return ap_proxyerror(r, ,HTTP_BAD_GATEWAY,
  +	return ap_proxyerror(r, HTTP_BAD_GATEWAY,
                                "Error reading from remote server");
       }
       if (i == 530) {
  
  
  

Mime
View raw message