Changeset 343
- Timestamp:
- 05/05/2005 08:15:05 AM (3 years ago)
- Files:
-
- 1 modified
-
branches/lighttpd-1.3.x/src/mod_fastcgi.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/lighttpd-1.3.x/src/mod_fastcgi.c
r318 r343 751 751 /* create socket */ 752 752 if (-1 == bind(fcgi_fd, fcgi_addr, servlen)) { 753 log_error_write(srv, __FILE__, __LINE__, "ss", 754 "bind failed:", strerror(errno)); 753 log_error_write(srv, __FILE__, __LINE__, "sbds", 754 "bind failed for:", 755 proc->socket, 756 proc->port, 757 strerror(errno)); 755 758 return -1; 756 759 } … … 2361 2364 /* sanity check */ 2362 2365 if (!host || 2363 ((!host->host->used || !host->port) && !host->unixsocket->used)) return HANDLER_ERROR; 2364 2366 ((!host->host->used || !host->port) && !host->unixsocket->used)) { 2367 log_error_write(srv, __FILE__, __LINE__, "sxddd", 2368 "write-req: error", 2369 host, 2370 host->host->used, 2371 host->port, 2372 host->unixsocket->used); 2373 return HANDLER_ERROR; 2374 } 2375 2376 2365 2377 switch(hctx->state) { 2366 2378 case FCGI_STATE_INIT: … … 2547 2559 2548 2560 if (hctx->write_offset == hctx->write_buffer->used) { 2561 /* we don't need the out event anymore */ 2562 fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd); 2563 fdevent_event_add(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN); 2549 2564 fcgi_set_state(srv, hctx, FCGI_STATE_READ); 2550 2565 } … … 2553 2568 case FCGI_STATE_READ: 2554 2569 /* waiting for a response */ 2555 2556 fdevent_event_add(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);2557 2558 2570 break; 2559 2571 default: … … 2657 2669 return HANDLER_WAIT_FOR_FD; 2658 2670 default: 2671 log_error_write(srv, __FILE__, __LINE__, "s", "subrequest write-req default"); 2659 2672 return HANDLER_ERROR; 2660 2673 } … … 2694 2707 fcgi_extension_host *host= hctx->host; 2695 2708 2696 joblist_append(srv, con);2697 2698 2709 if ((revents & FDEVENT_IN) && 2699 2710 hctx->state == FCGI_STATE_READ) { … … 2725 2736 } 2726 2737 2738 joblist_append(srv, con); 2727 2739 return HANDLER_FINISHED; 2728 2740 case -1: … … 2806 2818 2807 2819 2820 joblist_append(srv, con); 2808 2821 return HANDLER_FINISHED; 2809 2822 } … … 2859 2872 connection_set_state(srv, con, CON_STATE_ERROR); 2860 2873 fcgi_connection_close(srv, hctx); 2874 joblist_append(srv, con); 2861 2875 } 2862 2876 } else if (revents & FDEVENT_ERR) { … … 2868 2882 connection_set_state(srv, con, CON_STATE_ERROR); 2869 2883 fcgi_connection_close(srv, hctx); 2884 joblist_append(srv, con); 2870 2885 } 2871 2886

