fcgi_hash_buckets *q = b;
b = b->next;
free(q);
- }
+ }
p = h->data;
while (p) {
fcgi_data_seg *q = p;
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 */
fcgi_data_seg *q = h->data;
h->data = h->data->next;
- free(q);
+ free(q);
}
h->data->pos = h->data->data;
}
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;
8192, 8192, 0, &saw);
if (namedPipe == INVALID_HANDLE_VALUE) {
return -1;
- }
+ }
listen_socket = _open_osfhandle((long)namedPipe, 0);
if (!is_initialized) {
fcgi_init();
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);
}
}
#endif
fcgi_hash_init(&req->env, 4096);
-
+
return req;
}
return -1;
}
pos += 0xfff8;
- }
-
+ }
+
pad = (((len - pos) + 7) & ~7) - (len - pos);
rest = pad ? 8 - pad : 0;