fixed calculation of unix-socket path length if SUN_LEN is not defined (fixes #553)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@1022 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.11
Jan Kneschke 17 years ago
parent a743ad8063
commit 9d3c1b09de
  1. 2
      src/mod_fastcgi.c
  2. 2
      src/mod_scgi.c

@ -1658,7 +1658,7 @@ static connection_result_t fcgi_establish_connection(server *srv, handler_ctx *h
servlen = SUN_LEN(&fcgi_addr_un);
#else
/* stevens says: */
servlen = proc->socket->used - 1 + sizeof(fcgi_addr_un.sun_family);
servlen = proc->socket->used + sizeof(fcgi_addr_un.sun_family);
#endif
fcgi_addr = (struct sockaddr *) &fcgi_addr_un;
#else

@ -1296,7 +1296,7 @@ static int scgi_establish_connection(server *srv, handler_ctx *hctx) {
servlen = SUN_LEN(&scgi_addr_un);
#else
/* stevens says: */
servlen = proc->socket->used - 1 + sizeof(scgi_addr_un.sun_family);
servlen = proc->socket->used + sizeof(scgi_addr_un.sun_family);
#endif
scgi_addr = (struct sockaddr *) &scgi_addr_un;
#else

Loading…
Cancel
Save