fixed calculation of socket-len if SUN_LEN is not defined

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@1009 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.11
Jan Kneschke 17 years ago
parent b72583c27a
commit 0525ed2816
  1. 2
      src/mod_fastcgi.c
  2. 2
      src/mod_scgi.c
  3. 2
      src/network.c

@ -824,7 +824,7 @@ static int fcgi_spawn_connection(server *srv,
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
socket_type = AF_UNIX;
fcgi_addr = (struct sockaddr *) &fcgi_addr_un;

@ -645,7 +645,7 @@ static int scgi_spawn_connection(server *srv,
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
socket_type = AF_UNIX;
scgi_addr = (struct sockaddr *) &scgi_addr_un;

@ -252,7 +252,7 @@ int network_server_init(server *srv, buffer *host_token, specific_config *s) {
addr_len = SUN_LEN(&srv_socket->addr.un);
#else
/* stevens says: */
addr_len = strlen(host) + sizeof(srv_socket->addr.un.sun_family);
addr_len = strlen(host) + 1 + sizeof(srv_socket->addr.un.sun_family);
#endif
/* check if the socket exists and try to connect to it. */

Loading…
Cancel
Save