SOURCES: lighttpd-branch.diff - svn 1210

glen glen at pld-linux.org
Thu Jul 20 00:03:09 CEST 2006


Author: glen                         Date: Wed Jul 19 22:03:09 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- svn 1210

---- Files affected:
SOURCES:
   lighttpd-branch.diff (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SOURCES/lighttpd-branch.diff
diff -u SOURCES/lighttpd-branch.diff:1.8 SOURCES/lighttpd-branch.diff:1.9
--- SOURCES/lighttpd-branch.diff:1.8	Tue Jul 18 16:36:48 2006
+++ SOURCES/lighttpd-branch.diff	Thu Jul 20 00:03:03 2006
@@ -25,7 +25,7 @@
  
    * added ability to specify which ip address spawn-fci listens on 
 --- ../lighttpd-1.4.11/configure.in	2006-03-04 16:32:38.000000000 +0200
-+++ lighttpd-1.4.12/configure.in	2006-07-16 00:26:05.000000000 +0300
++++ lighttpd-1.4.12/configure.in	2006-07-19 20:02:55.000000000 +0300
 @@ -1,7 +1,7 @@
  #                                               -*- Autoconf -*-
  # Process this file with autoconf to produce a configure script.
@@ -101,15 +101,26 @@
  
   AC_SUBST(LUA_CFLAGS)
   AC_SUBST(LUA_LIBS)
-@@ -440,7 +437,7 @@
+@@ -440,8 +437,8 @@
  esac
  
  AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
 -		  strdup strerror strstr strtol sendfile  getopt socket \
+-		  gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
 +		  strdup strerror strstr strtol sendfile  getopt socket lstat \
- 		  gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
++		  gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot strptime \
  		  getuid select signal pathconf madvise posix_fadvise posix_madvise \
  		  writev sigaction sendfile64 send_file kqueue port_create localtime_r])
+ 
+@@ -519,7 +516,7 @@
+ 
+ 
+ if test "${GCC}" = "yes"; then
+-       CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic"
++       CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu99"
+ fi
+ 
+ dnl build version-id
 @@ -538,7 +535,7 @@
  AC_OUTPUT
  
@@ -135,7 +146,7 @@
  
  $ECHO
 --- ../lighttpd-1.4.11/cygwin/lighttpd.README	2006-03-07 14:22:19.000000000 +0200
-+++ lighttpd-1.4.12/cygwin/lighttpd.README	2006-07-17 22:02:18.000000000 +0300
++++ lighttpd-1.4.12/cygwin/lighttpd.README	2006-07-19 20:09:00.000000000 +0300
 @@ -1,114 +1,114 @@
 -lighttpd
 -------------------------------------------
@@ -762,7 +773,7 @@
    
    # current timestamp
 --- ../lighttpd-1.4.11/lighttpd.spec	2006-03-07 14:22:18.000000000 +0200
-+++ lighttpd-1.4.12/lighttpd.spec	2006-07-17 22:02:18.000000000 +0300
++++ lighttpd-1.4.12/lighttpd.spec	2006-07-19 20:09:00.000000000 +0300
 @@ -1,6 +1,6 @@
  Summary: A fast webserver with minimal memory-footprint (lighttpd)
  Name: lighttpd
@@ -772,7 +783,7 @@
  Source: http://jan.kneschke.de/projects/lighttpd/download/lighttpd-%version.tar.gz
  Packager: Jan Kneschke <jan at kneschke.de>
 --- ../lighttpd-1.4.11/openwrt/control	2006-03-07 14:22:19.000000000 +0200
-+++ lighttpd-1.4.12/openwrt/control	2006-07-17 22:02:18.000000000 +0300
++++ lighttpd-1.4.12/openwrt/control	2006-07-19 20:09:00.000000000 +0300
 @@ -1,8 +1,8 @@
  Package: lighttpd
 -Version: 1.4.11
@@ -785,7 +796,7 @@
  Priority: optional
  Depends:
 --- ../lighttpd-1.4.11/openwrt/lighttpd.mk	2006-03-07 14:22:19.000000000 +0200
-+++ lighttpd-1.4.12/openwrt/lighttpd.mk	2006-07-17 22:02:18.000000000 +0300
++++ lighttpd-1.4.12/openwrt/lighttpd.mk	2006-07-19 20:09:00.000000000 +0300
 @@ -10,7 +10,7 @@
  
  #  For this example we'll use a fairly simple package that compiles easily
@@ -796,7 +807,7 @@
  LIGHTTPD_DIR=$(BUILD_DIR)/$(LIGHTTPD)
  LIGHTTPD_IPK=$(BUILD_DIR)/$(LIGHTTPD)_mipsel.ipk
 --- ../lighttpd-1.4.11/src/Makefile.am	2006-03-07 14:20:20.000000000 +0200
-+++ lighttpd-1.4.12/src/Makefile.am	2006-07-18 17:34:32.000000000 +0300
++++ lighttpd-1.4.12/src/Makefile.am	2006-07-19 20:02:55.000000000 +0300
 @@ -16,18 +16,24 @@
  else
  configparser.y: lemon
@@ -829,8 +840,9 @@
        data_config.c bitset.c \
        inet_ntop_cache.c crc32.c \
 -      connections-glue.c \
+-      configfile-glue.c \
 +      connections-glue.c iosocket.c \
-       configfile-glue.c \
++      configfile-glue.c status_counter.c \
        http-header-glue.c \
        network_write.c network_linux_sendfile.c \
        network_freebsd_sendfile.c network_writev.c \
@@ -879,7 +891,7 @@
  lib_LTLIBRARIES += mod_ssi.la
  mod_ssi_la_SOURCES = mod_ssi_exprparser.c mod_ssi_expr.c mod_ssi.c 
  mod_ssi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
-@@ -240,7 +259,12 @@
+@@ -240,7 +259,13 @@
        mod_ssi.h mod_ssi_expr.h inet_ntop_cache.h \
        configparser.h mod_ssi_exprparser.h \
        sys-mmap.h sys-socket.h mod_cml.h mod_cml_funcs.h \
@@ -889,11 +901,12 @@
 +      iosocket.h array-static.h \
 +      mod_proxy_core_address.h mod_proxy_core_backend.h \
 +      mod_proxy_core_backlog.h mod_proxy_core.h  \
-+      mod_proxy_core_pool.h mod_proxy_core_rewrites.h
++      mod_proxy_core_pool.h mod_proxy_core_rewrites.h \
++      status_counter.h
  
  DEFS= @DEFS@ -DLIBRARY_DIR="\"$(libdir)\""
  
-@@ -267,4 +291,4 @@
+@@ -267,4 +292,4 @@
  #ajp_SOURCES = ajp.c
  
  noinst_HEADERS   = $(hdr)
@@ -1345,7 +1358,7 @@
  	int last_used_ndx; /* round robin */
  } data_fastcgi;
 --- ../lighttpd-1.4.11/src/base.h	2006-01-11 16:51:04.000000000 +0200
-+++ lighttpd-1.4.12/src/base.h	2006-07-18 13:03:40.000000000 +0300
++++ lighttpd-1.4.12/src/base.h	2006-07-19 20:02:55.000000000 +0300
 @@ -2,7 +2,6 @@
  #define _BASE_H_
  
@@ -1901,7 +1914,7 @@
  	/* caches */
  #ifdef HAVE_IPV6
  	inet_ntop_cache_type inet_ntop_cache[INET_NTOP_CACHE_MAX];
-@@ -547,31 +529,31 @@
+@@ -547,59 +529,46 @@
  	mtime_cache_type mtime_cache[FILE_CACHE_MAX];
  
  	array *split_vals;
@@ -1940,13 +1953,21 @@
 +
  	stat_cache  *stat_cache;
  
- 	/**
-@@ -588,18 +570,20 @@
- 	 *   fastcgi.backend.<key>.disconnects = ...
- 	 */
- 	array *status;
+-	/**
+-	 * The status array can carry all the status information you want
+-	 * the key to the array is <module-prefix>.<name>
+-	 * and the values are counters
+-	 *
+-	 * example:
+-	 *   fastcgi.backends        = 10
+-	 *   fastcgi.active-backends = 6
+-	 *   fastcgi.backend.<key>.load = 24
+-	 *   fastcgi.backend.<key>....
+-	 *
+-	 *   fastcgi.backend.<key>.disconnects = ...
+-	 */
+-	array *status;
 -	
-+
  	fdevent_handler_t event_handler;
  
 -	int (* network_backend_write)(struct server *srv, connection *con, int fd, chunkqueue *cq);
@@ -21927,14 +21948,21 @@
  	return 0;
  }
 --- ../lighttpd-1.4.11/src/mod_fastcgi.c	2006-03-09 13:18:39.000000000 +0200
-+++ lighttpd-1.4.12/src/mod_fastcgi.c	2006-07-18 13:03:40.000000000 +0300
++++ lighttpd-1.4.12/src/mod_fastcgi.c	2006-07-19 20:02:55.000000000 +0300
 @@ -1,5 +1,4 @@
  #include <sys/types.h>
 -#include <unistd.h>
  #include <errno.h>
  #include <fcntl.h>
  #include <string.h>
-@@ -24,7 +23,7 @@
+@@ -18,13 +17,14 @@
+ #include "connections.h"
+ #include "response.h"
+ #include "joblist.h"
++#include "status_counter.h"
+ 
+ #include "plugin.h"
+ 
  #include "inet_ntop_cache.h"
  #include "stat_cache.h"
  
@@ -21943,7 +21971,7 @@
  #include <stdio.h>
  
  #ifdef HAVE_SYS_FILIO_H
-@@ -32,7 +31,11 @@
+@@ -32,7 +32,11 @@
  #endif
  
  #include "sys-socket.h"
@@ -21955,7 +21983,7 @@
  
  #ifndef UNIX_PATH_MAX
  # define UNIX_PATH_MAX 108
-@@ -45,14 +48,13 @@
+@@ -45,14 +49,13 @@
  #include <sys/wait.h>
  #endif
  
@@ -21973,7 +22001,7 @@
   */
  
  typedef struct fcgi_proc {
-@@ -61,7 +63,7 @@
+@@ -61,7 +64,7 @@
  	unsigned port;  /* config.port + pno */
  
  	buffer *connection_name; /* either tcp:<host>:<port> or unix:<socket> for debuggin purposes */
@@ -21982,7 +22010,7 @@
  	pid_t pid;   /* PID of the spawned process (0 if not spawned locally) */
  
  
-@@ -70,20 +72,20 @@
+@@ -70,20 +73,20 @@
  	time_t last_used; /* see idle_timeout */
  	size_t requests;  /* see max_requests */
  	struct fcgi_proc *prev, *next; /* see first */
@@ -22008,7 +22036,7 @@
  } fcgi_proc;
  
  typedef struct {
-@@ -94,20 +96,20 @@
+@@ -94,20 +97,20 @@
  	 * sorted by lowest load
  	 *
  	 * whenever a job is done move it up in the list
@@ -22036,7 +22064,7 @@
  	 */
  
  	unsigned short min_procs;
-@@ -119,44 +121,44 @@
+@@ -119,44 +122,44 @@
  
  	/*
  	 * kick the process from the list if it was not
@@ -22096,7 +22124,7 @@
  	unsigned short port;
  
  	/*
-@@ -169,7 +171,7 @@
+@@ -169,7 +172,7 @@
  	 */
  	buffer *unixsocket;
  
@@ -22105,7 +22133,7 @@
  	 * process ourself
  	 *
  	 * bin-path is the path to the binary
-@@ -177,19 +179,19 @@
+@@ -177,19 +180,19 @@
  	 * check min_procs and max_procs for the number
  	 * of process to start-up
  	 */
@@ -22132,7 +22160,7 @@
  	 * remote host
  	 *
  	 * reasons:
-@@ -208,7 +210,7 @@
+@@ -208,7 +211,7 @@
  	unsigned short mode;
  
  	/*
@@ -22141,7 +22169,7 @@
  	 * or not. FastCGI doesn't care if the service is
  	 * remote. If the web-server side doesn't contain
  	 * the fastcgi-files we should not stat() for them
-@@ -218,11 +220,11 @@
+@@ -218,11 +221,11 @@
  
  	/*
  	 * append PATH_INFO to SCRIPT_FILENAME
@@ -22156,7 +22184,7 @@
  	unsigned short break_scriptfilename_for_php;
  
  	/*
-@@ -231,12 +233,12 @@
+@@ -231,12 +234,12 @@
  	 *
  	 */
  	unsigned short allow_xsendfile;
@@ -22171,7 +22199,7 @@
  	only if a process is killed max_id waits for the process itself
  	to die and decrements its afterwards */
  
-@@ -245,17 +247,17 @@
+@@ -245,17 +248,17 @@
  
  /*
   * one extension can have multiple hosts assigned
@@ -22192,7 +22220,7 @@
   *
   * in case of PHP and FCGI_CHILDREN we have again a procs
   * but we don't control it directly.
-@@ -268,7 +270,7 @@
+@@ -268,7 +271,7 @@
  	int note_is_sent;
  
  	fcgi_extension_host **hosts;
@@ -22201,7 +22229,7 @@
  	size_t used;
  	size_t size;
  } fcgi_extension;
-@@ -282,10 +284,10 @@
+@@ -282,10 +285,10 @@
  
  
  typedef struct {
@@ -22214,7 +22242,7 @@
  	int debug;
  } plugin_config;
  
-@@ -297,7 +299,7 @@
+@@ -297,7 +300,7 @@
  
  typedef struct {
  	char **ptr;
@@ -22223,7 +22251,7 @@
  	size_t size;
  	size_t used;
  } char_array;
-@@ -306,55 +308,54 @@
+@@ -306,55 +309,54 @@
  typedef struct {
  	PLUGIN_DATA;
  	buffer_uint fcgi_request_id;
@@ -22300,16 +22328,66 @@
  	connection *remote_conn;  /* dumb pointer */
  	plugin_data *plugin_data; /* dumb pointer */
  } handler_ctx;
-@@ -380,7 +381,7 @@
- 	return di;
- }
+@@ -363,49 +365,6 @@
+ /* ok, we need a prototype */
+ static handler_t fcgi_handle_fdevent(void *s, void *ctx, int revents);
  
+-data_integer *status_counter_get_counter(server *srv, const char *s, size_t len) {
+-	data_integer *di;
+-
+-	if (NULL == (di = (data_integer *)array_get_element(srv->status, s))) {
+-		/* not found, create it */
+-
+-		if (NULL == (di = (data_integer *)array_get_unused_element(srv->status, TYPE_INTEGER))) {
+-			di = data_integer_init();
+-		}
+-		buffer_copy_string_len(di->key, s, len);
+-		di->value = 0;
+-
+-		array_insert_unique(srv->status, (data_unset *)di);
+-	}
+-	return di;
+-}
+-
 -/* dummies of the statistic framework functions 
-+/* dummies of the statistic framework functions
-  * they will be moved to a statistics.c later */
- int status_counter_inc(server *srv, const char *s, size_t len) {
- 	data_integer *di = status_counter_get_counter(srv, s, len);
-@@ -429,7 +430,7 @@
+- * they will be moved to a statistics.c later */
+-int status_counter_inc(server *srv, const char *s, size_t len) {
+-	data_integer *di = status_counter_get_counter(srv, s, len);
+-
+-	di->value++;
+-
+-	return 0;
+-}
+-
+-int status_counter_dec(server *srv, const char *s, size_t len) {
+-	data_integer *di = status_counter_get_counter(srv, s, len);
+-
+-	if (di->value > 0) di->value--;
+-
+-	return 0;
+-}
+-
+-int status_counter_set(server *srv, const char *s, size_t len, int val) {
+-	data_integer *di = status_counter_get_counter(srv, s, len);
+-
+-	di->value = val;
+-
+-	return 0;
+-}
+-
+ int fastcgi_status_copy_procname(buffer *b, fcgi_extension_host *host, fcgi_proc *proc) {
+ 	buffer_copy_string(b, "fastcgi.backend.");
+ 	buffer_append_string_buffer(b, host->id);
+@@ -421,7 +380,7 @@
+ #define CLEAN(x) \
+ 	fastcgi_status_copy_procname(b, host, proc); \
+ 	buffer_append_string(b, x); \
+-	status_counter_set(srv, CONST_BUF_LEN(b), 0);
++	status_counter_set(CONST_BUF_LEN(b), 0);
+ 
+ 	CLEAN(".disabled");
+ 	CLEAN(".died");
+@@ -429,42 +388,39 @@
  	CLEAN(".connected");
  	CLEAN(".load");
  
@@ -22318,7 +22396,9 @@
  
  #define CLEAN(x) \
  	fastcgi_status_copy_procname(b, host, NULL); \
-@@ -438,33 +439,30 @@
+ 	buffer_append_string(b, x); \
+-	status_counter_set(srv, CONST_BUF_LEN(b), 0);
++	status_counter_set(CONST_BUF_LEN(b), 0);
  
  	CLEAN(".load");
  
@@ -22360,7 +22440,7 @@
  	return hctx;
  }
  
-@@ -473,12 +471,13 @@
+@@ -473,12 +429,13 @@
  		hctx->host->load--;
  		hctx->host = NULL;
  	}
@@ -22376,7 +22456,7 @@
  	free(hctx);
  }
  
-@@ -488,21 +487,21 @@
+@@ -488,21 +445,21 @@
  	f = calloc(1, sizeof(*f));
  	f->unixsocket = buffer_init();
  	f->connection_name = buffer_init();
@@ -22403,7 +22483,7 @@
  	free(f);
  }
  
-@@ -519,13 +518,13 @@
+@@ -519,13 +476,13 @@
  	f->bin_env = array_init();
  	f->bin_env_copy = array_init();
  	f->strip_request_uri = buffer_init();
@@ -22419,7 +22499,7 @@
  	buffer_free(h->id);
  	buffer_free(h->host);
  	buffer_free(h->unixsocket);
-@@ -534,49 +533,49 @@
+@@ -534,49 +491,49 @@
  	buffer_free(h->strip_request_uri);
  	array_free(h->bin_env);
  	array_free(h->bin_env_copy);
@@ -22483,7 +22563,7 @@
  	free(f);
  }
  
-@@ -625,24 +624,25 @@
+@@ -625,24 +582,25 @@
  		assert(fe->hosts);
  	}
  
@@ -22516,7 +22596,7 @@
  	return p;
  }
  
-@@ -650,81 +650,82 @@
+@@ -650,81 +608,82 @@
  FREE_FUNC(mod_fastcgi_free) {
  	plugin_data *p = p_d;
  	buffer_uint *r = &(p->fcgi_request_id);
@@ -22621,7 +22701,7 @@
  	if (env->size == 0) {
  		env->size = 16;
  		env->ptr = malloc(env->size * sizeof(*env->ptr));
-@@ -732,9 +733,9 @@
+@@ -732,9 +691,9 @@
  		env->size += 16;
  		env->ptr = realloc(env->ptr, env->size * sizeof(*env->ptr));
  	}
@@ -22633,7 +22713,7 @@
  	return 0;
  }
  
-@@ -753,15 +754,15 @@
+@@ -753,15 +712,15 @@
  			if (env->size == 0) {
  				env->size = 16;
  				env->ptr = malloc(env->size * sizeof(*env->ptr));
@@ -22652,7 +22732,7 @@
  			start = b->ptr + i + 1;
  			break;
  		default:
-@@ -794,7 +795,7 @@
+@@ -794,7 +753,7 @@
  	return 0;
  }
  
@@ -22661,7 +22741,7 @@
  				 plugin_data *p,
  				 fcgi_extension_host *host,
  				 fcgi_proc *proc) {
-@@ -806,31 +807,27 @@
+@@ -806,31 +765,27 @@
  #endif
  	struct sockaddr_in fcgi_addr_in;
  	struct sockaddr *fcgi_addr;
@@ -22700,7 +22780,7 @@
  		socket_type = AF_UNIX;
  		fcgi_addr = (struct sockaddr *) &fcgi_addr_un;
  
-@@ -844,108 +841,108 @@
+@@ -844,108 +799,108 @@
  #endif
  	} else {
  		fcgi_addr_in.sin_family = AF_INET;
@@ -22840,7 +22920,7 @@
  			arg.ptr = NULL;
  			arg.size = 0;
  			arg.used = 0;
-@@ -955,18 +952,18 @@
+@@ -955,18 +910,18 @@
  				dup2(fcgi_fd, FCGI_LISTENSOCK_FILENO);
  				close(fcgi_fd);
  			}
@@ -22862,7 +22942,7 @@
  					if (NULL != (ge = getenv(ds->value->ptr))) {
  						env_add(&env, CONST_BUF_LEN(ds->value), ge, strlen(ge));
  					}
-@@ -974,39 +971,39 @@
+@@ -974,39 +929,39 @@
  			} else {
  				for (i = 0; environ[i]; i++) {
  					char *eq;
@@ -22910,7 +22990,7 @@
  				/* change to the physical directory */
  				if (-1 == chdir(arg.ptr[0])) {
  					*c = '/';
-@@ -1018,12 +1015,12 @@
+@@ -1018,12 +973,12 @@
  
  			/* exec the cgi */
  			execve(arg.ptr[0], arg.ptr, env.ptr);
@@ -22927,7 +23007,7 @@
  			break;
  		}
  		case -1:
-@@ -1031,17 +1028,17 @@
+@@ -1031,17 +986,17 @@
  			break;
  		default:
  			/* father */
@@ -22948,7 +23028,7 @@
  						"pid not found:", strerror(errno));
  				return -1;
  			default:
-@@ -1049,10 +1046,10 @@
+@@ -1049,10 +1004,10 @@
  						"the fastcgi-backend", host->bin_path, "failed to start:");
  				/* the child should not terminate at all */
  				if (WIFEXITED(status)) {
@@ -22962,7 +23042,7 @@
  							"if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.\n"
  							"You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' "
  							"in the output, NOT (cgi) NOR (cli)\n"
-@@ -1060,8 +1057,8 @@
+@@ -1060,8 +1015,8 @@
  					log_error_write(srv, __FILE__, __LINE__, "s",
  							"If this is PHP on Gentoo add fastcgi to the USE flags");
  				} else if (WIFSIGNALED(status)) {
@@ -22973,7 +23053,7 @@
  							WTERMSIG(status));
  
  					if (WTERMSIG(status) == 11) {
-@@ -1071,8 +1068,8 @@
+@@ -1071,8 +1026,8 @@
  								"If this is PHP try to remove the byte-code caches for now and try again.");
  					}
  				} else {
@@ -22984,7 +23064,7 @@
  							status);
  				}
  				return -1;
-@@ -1082,26 +1079,26 @@
+@@ -1082,26 +1037,26 @@
  			proc->pid = child;
  			proc->last_used = srv->cur_ts;
  			proc->is_local = 1;
@@ -23016,7 +23096,7 @@
  	return 0;
  }
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/lighttpd-branch.diff?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list