diff options
author | Stefan Bühler <stbuehler@web.de> | 2009-10-20 07:32:40 +0000 |
---|---|---|
committer | Stefan Bühler <stbuehler@web.de> | 2009-10-20 07:32:40 +0000 |
commit | 4eeb18639772cdd4e6959925a9aa07aa2dccd86a (patch) | |
tree | f8ccf2a229c0bf7f0dba52ad2754474e2705580d | |
parent | 9d20c387197019a3fb5610ddcd69c27177c552b0 (diff) | |
download | lighttpd-git-lighttpd-1.4.24.tar.gz |
Fix broken return values from int to enum in mod_fastcgilighttpd-1.4.24
git-svn-id: svn+ssh://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2670 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/mod_fastcgi.c | 22 |
2 files changed, 7 insertions, 16 deletions
@@ -61,6 +61,7 @@ NEWS * fix mod_webdav crash from #1793 (fixes #2084, thx hiroya) * Don't print ssl error if client didn't support TLS SNI * Fix linger close timeout handling, drop timeout to 5 seconds (fixes #2086) + * Fix broken return values from int to enum in mod_fastcgi - 1.4.23 - 2009-06-19 * Added some extra warning options in cmake and fix the resulting warnings (unused/static functions) diff --git a/src/mod_fastcgi.c b/src/mod_fastcgi.c index caff55ca..f7563248 100644 --- a/src/mod_fastcgi.c +++ b/src/mod_fastcgi.c @@ -1637,16 +1637,8 @@ static int fcgi_header(FCGI_Header * header, unsigned char type, size_t request_ return 0; } -/** - * - * returns - * -1 error - * 0 connected - * 1 not connected yet - */ typedef enum { - CONNECTION_UNSET, CONNECTION_OK, CONNECTION_DELAYED, /* retry after event, take same host */ CONNECTION_OVERLOADED, /* disable for 1 second, take another backend */ @@ -1686,7 +1678,7 @@ static connection_result_t fcgi_establish_connection(server *srv, handler_ctx *h buffer_append_string_buffer(proc->connection_name, proc->unixsocket); } #else - return -1; + return CONNECTION_DEAD; #endif } else { fcgi_addr_in.sin_family = AF_INET; @@ -1696,7 +1688,7 @@ static connection_result_t fcgi_establish_connection(server *srv, handler_ctx *h "converting IP address failed for", host->host, "\nBe sure to specify an IP address here"); - return -1; + return CONNECTION_DEAD; } } else { fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK); @@ -3045,8 +3037,6 @@ static handler_t fcgi_write_request(server *srv, handler_ctx *hctx) { fcgi_set_state(srv, hctx, FCGI_STATE_PREPARE_WRITE); break; - case CONNECTION_UNSET: - break; } case FCGI_STATE_PREPARE_WRITE: @@ -3065,10 +3055,10 @@ static handler_t fcgi_write_request(server *srv, handler_ctx *hctx) { if (p->conf.debug) { log_error_write(srv, __FILE__, __LINE__, "ssdsbsd", - "got proc:", - "pid:", hctx->proc->pid, - "socket:", hctx->proc->connection_name, - "load:", hctx->proc->load); + "got proc:", + "pid:", hctx->proc->pid, + "socket:", hctx->proc->connection_name, + "load:", hctx->proc->load); } /* move the proc-list entry down the list */ |