Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.892 2005/02/23 13:42:41 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.893 2005/02/23 16:56:19 grubba Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:1567:    if (!port_obj) port_obj = Stdio.Port();    Privs privs = Privs (sprintf ("Binding %s://%s:%d/",    (string) name, ip || "*", (int) port));    if (port_obj->bind(port, got_connection, ip))    {    privs = 0;    bound = 1;    return;    }    privs = 0; + #if constant(System.EAFNOSUPPORT) +  if (port_obj->errno() == System.EAFNOSUPPORT) { +  // Fail permanently. +  error("Invalid address " + ip); +  } + #endif /* System.EAFNOSUPPORT */    report_error(LOC_M(6, "Failed to bind %s://%s:%d/ (%s)")+"\n",    (string)name, (ip||"*"), (int)port,    strerror(port_obj->errno()));    werror (describe_backtrace (backtrace()));   #if constant(System.EADDRINUSE) || constant(system.EADDRINUSE)    if (   #if constant(System.EADDRINUSE)    (port_obj->errno() == System.EADDRINUSE) &&   #else /* !constant(System.EADDRINUSE) */    (port_obj->errno() == system.EADDRINUSE) &&
Roxen.git/server/base_server/roxen.pike:2201:    }       if( !m[ required_host ] )    m[ required_host ] = ([ ]);       mixed err;    if (err = catch {    m[ required_host ][ port ] = prot( port, required_host );    }) {    failures++; -  report_error(sprintf("Initializing the port handler for URL " + -  url + " failed!\n" +  if (has_prefix(describe_error(err), "Invalid address") && +  required_host && has_value(required_host, ":")) { +  report_error(sprintf("Failed to initialize IPv6 port for URL %s!" +  " (ip:%s)\n", +  url, required_host)); +  } else { +  report_error(sprintf("Initializing the port handler for URL %s" +  " failed! (ip:%s)\n"    "%s\n", -  +  url, +  required_host||"ANY",    describe_backtrace(err))); -  +  }    continue;    }       if( !( m[ required_host ][ port ] ) )    {    m_delete( m[ required_host ], port );    failures++;    if (required_host) {    report_warning(LOC_M(22, "Binding the port on IP %s failed\n"    " for URL %s!\n"),