Branch: Tag:

1999-11-02

1999-11-02 01:37:22 by Per Hedbor <ph@opera.com>

added _sprintf

Rev: server/base_server/configuration.pike:1.216
Rev: server/base_server/module.pike:1.50
Rev: server/base_server/module_support.pike:1.30
Rev: server/base_server/roxen.pike:1.342

1:   /* -  * $Id: roxen.pike,v 1.341 1999/10/23 20:43:44 marcus Exp $ +  * $Id: roxen.pike,v 1.342 1999/11/02 01:37:22 per Exp $    *    * The Roxen Challenger main program.    *
7:    */      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.341 1999/10/23 20:43:44 marcus Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.342 1999/11/02 01:37:22 per Exp $";      object backend_thread;   object argcache;
782:    ip = i;       ::create(); -  -  if(!bind( port, got_connection, ip )) { -  report_error(sprintf("Failed to bind %s://%s:%d/\n", name, ip, port)); +  if(!bind( port, got_connection, ip )) +  { +  report_error("Failed to bind %s://%s:%d/ (%s)\n", (string)name, +  (ip||"*"), (int)port, strerror( errno() ));    destruct();    }    } -  +  +  string _sprintf( ) +  { +  return "Protocol("+name+"://"+ip+":"+port+")";    } -  + }      class SSLProtocol   {
986:    destruct();    }   #endif /* constant(SSL.sslfile) */ +  +  string _sprintf( ) +  { +  return "SSLProtocol("+name+"://"+ip+":"+port+")";    } -  + }      class HTTP   {
1212:       array(string) required_hosts;    -  /* if( !prot->supports_ipless ) */ +  /* if( !prot->supports_ipless )*/    required_hosts = find_ips_for( host );    -  if (!required_hosts) { +  if (!required_hosts)    required_hosts = ({ 0 }); // ANY -  } +     -  +     mapping m;    if( !( m = open_ports[ protocol ] ) )    m = open_ports[ protocol ] = ([]);
1246:    failures++;    if (required_host) {    report_warning("Binding the port on IP " + required_host + -  " failed for URL " + url + "!\n"); +  " failed\n for URL " + url + "!\n");    }    continue;    }
1255:    }    if (failures == sizeof(required_hosts)) {    m_delete( urls, url ); -  report_error( "Cannot register URL "+url+", cannot bind the port!\n" ); +  report_error( "Cannot register URL "+url+"!\n" );    sort_urls();    return 0;    }
2091:    call_out(post_create,1); //we just want to delay some things a little   }    -  -  +    // Set the uid and gid to the ones requested by the user. If the sete*   // functions are available, and the define SET_EFFECTIVE is enabled,   // the euid and egid is set. This might be a minor security hole, but