Project

General

Profile

lighttpd_bug758.patch

davidb54, 2009-01-13 18:20

View differences:

lighttpd/src/joblist.c 2009-01-13 09:16:15.000000000 -0800
10 10
	con->in_joblist = 1;
11 11

  
12 12
	if (srv->joblist->size == 0) {
13
		srv->joblist->size  = 16;
13
		srv->joblist->size  = srv->max_conns;
14 14
		srv->joblist->ptr   = malloc(sizeof(*srv->joblist->ptr) * srv->joblist->size);
15 15
	} else if (srv->joblist->used == srv->joblist->size) {
16 16
		srv->joblist->size += 16;
......
45 45

  
46 46
int fdwaitqueue_append(server *srv, connection *con) {
47 47
	if (srv->fdwaitqueue->size == 0) {
48
		srv->fdwaitqueue->size  = 16;
48
		srv->fdwaitqueue->size  = srv->max_fds;
49 49
		srv->fdwaitqueue->ptr   = malloc(sizeof(*(srv->fdwaitqueue->ptr)) * srv->fdwaitqueue->size);
50 50
	} else if (srv->fdwaitqueue->used == srv->fdwaitqueue->size) {
51 51
		srv->fdwaitqueue->size += 16;
52
-- lighttpd.orig/src/connections.c	2009-01-06 22:23:32.000000000 -0800
52
++ lighttpd/src/connections.c	2009-01-13 09:15:19.000000000 -0800
......
47 47
	size_t i;
48 48

  
49 49
	if (conns->size == 0) {
50
		conns->size = 128;
50
		conns->size = srv->max_conns;
51 51
		conns->ptr = NULL;
52 52
		conns->ptr = malloc(sizeof(*conns->ptr) * conns->size);
53 53
		for (i = 0; i < conns->size; i++) {