dmitry Wed, 25 Aug 2010 11:44:15 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=302766
Log: ws Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c =================================================================== --- php/php-src/trunk/sapi/cgi/fastcgi.c 2010-08-25 11:07:38 UTC (rev 302765) +++ php/php-src/trunk/sapi/cgi/fastcgi.c 2010-08-25 11:44:15 UTC (rev 302766) @@ -198,7 +198,7 @@ fcgi_hash_buckets *q = b; b = b->next; free(q); - } + } p = h->data; while (p) { fcgi_data_seg *q = p; @@ -216,7 +216,7 @@ fcgi_hash_buckets *q = h->buckets; h->buckets = h->buckets->next; - free(q); + free(q); } h->buckets->idx = 0; /* delete all data segments except the first one */ @@ -224,7 +224,7 @@ fcgi_data_seg *q = h->data; h->data = h->data->next; - free(q); + free(q); } h->data->pos = h->data->data; } @@ -237,7 +237,7 @@ p->pos = p->data; p->end = p->pos + str_len + 1; p->next = h->data; - h->data = p; + h->data = p; } memcpy(h->data->pos, str, str_len); str = h->data->pos; @@ -633,7 +633,7 @@ 8192, 8192, 0, &saw); if (namedPipe == INVALID_HANDLE_VALUE) { return -1; - } + } listen_socket = _open_osfhandle((long)namedPipe, 0); if (!is_initialized) { fcgi_init(); @@ -675,35 +675,35 @@ if (!tcp) { chmod(path, 0777); } else { - char *ip = getenv("FCGI_WEB_SERVER_ADDRS"); - char *cur, *end; - int n; - - if (ip) { - ip = strdup(ip); - cur = ip; - n = 0; - while (*cur) { - if (*cur == ',') n++; - cur++; + char *ip = getenv("FCGI_WEB_SERVER_ADDRS"); + char *cur, *end; + int n; + + if (ip) { + ip = strdup(ip); + cur = ip; + n = 0; + while (*cur) { + if (*cur == ',') n++; + cur++; + } + allowed_clients = malloc(sizeof(in_addr_t) * (n+2)); + n = 0; + cur = ip; + while (cur) { + end = strchr(cur, ','); + if (end) { + *end = 0; + end++; } - allowed_clients = malloc(sizeof(in_addr_t) * (n+2)); - n = 0; - cur = ip; - while (cur) { - end = strchr(cur, ','); - if (end) { - *end = 0; - end++; - } - allowed_clients[n] = inet_addr(cur); - if (allowed_clients[n] == INADDR_NONE) { + allowed_clients[n] = inet_addr(cur); + if (allowed_clients[n] == INADDR_NONE) { fprintf(stderr, "Wrong IP address '%s' in FCGI_WEB_SERVER_ADDRS\n", cur); - } - n++; - cur = end; } - allowed_clients[n] = INADDR_NONE; + n++; + cur = end; + } + allowed_clients[n] = INADDR_NONE; free(ip); } } @@ -741,7 +741,7 @@ #endif fcgi_hash_init(&req->env, 4096); - + return req; } @@ -1375,8 +1375,8 @@ return -1; } pos += 0xfff8; - } - + } + pad = (((len - pos) + 7) & ~7) - (len - pos); rest = pad ? 8 - pad : 0;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php