Loading src/or/connection.c +16 −4 Original line number Diff line number Diff line Loading @@ -289,6 +289,15 @@ int connection_connect(connection_t *conn, char *address, uint32_t addr, uint16_ return 1; } static void listener_close_if_present(int type) { connection_t *conn = connection_get_by_type(type); if (conn) { close(conn->s); conn->s = -1; conn->marked_for_close = 1; } } /* start all connections that should be up but aren't */ int retry_all_connections(void) { Loading @@ -296,19 +305,22 @@ int retry_all_connections(void) { router_retry_connections(); } if(options.ORPort && !connection_get_by_type(CONN_TYPE_OR_LISTENER)) { if(options.ORPort) { listener_close_if_present(CONN_TYPE_OR_LISTENER); if(connection_create_listener(options.ORBindAddress, options.ORPort, CONN_TYPE_OR_LISTENER) < 0) return -1; } if(options.DirPort && !connection_get_by_type(CONN_TYPE_DIR_LISTENER)) { if(options.DirPort) { listener_close_if_present(CONN_TYPE_DIR_LISTENER); if(connection_create_listener(options.DirBindAddress, options.DirPort, CONN_TYPE_DIR_LISTENER) < 0) return -1; } if(options.SocksPort && !connection_get_by_type(CONN_TYPE_AP_LISTENER)) { if(options.SocksPort) { listener_close_if_present(CONN_TYPE_AP_LISTENER); if(connection_create_listener(options.SocksBindAddress, options.SocksPort, CONN_TYPE_AP_LISTENER) < 0) return -1; Loading src/or/cpuworker.c +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ int connection_cpu_process_inbuf(connection_t *conn) { assert(conn && conn->type == CONN_TYPE_CPUWORKER); if(conn->inbuf_reached_eof) { log_fn(LOG_WARN,"Read eof. Worker dying."); log_fn(LOG_WARN,"Read eof. Worker has died."); if(conn->state != CPUWORKER_STATE_IDLE) { /* the circ associated with this cpuworker will have to wait until * it gets culled in run_connection_housekeeping(), since we have Loading src/or/dirserv.c +5 −7 Original line number Diff line number Diff line Loading @@ -349,7 +349,6 @@ list_running_servers(char **nicknames_out) return 0; } int dirserv_dump_directory_to_string(char *s, int maxlen, crypto_pk_env_t *private_key) Loading Loading @@ -400,8 +399,7 @@ dirserv_dump_directory_to_string(char *s, int maxlen, ((int)digest[0])&0xff,((int)digest[1])&0xff, ((int)digest[2])&0xff,((int)digest[3])&0xff); strncpy(cp, "-----BEGIN SIGNATURE-----\n", maxlen-i); strncpy(cp, "-----BEGIN SIGNATURE-----\n", maxlen-i); i = strlen(s); cp = s+i; Loading src/or/main.c +3 −2 Original line number Diff line number Diff line Loading @@ -481,8 +481,9 @@ static int do_main_loop(void) { /* no need to provide argc/v, they've been cached inside init_from_config */ exit(1); } if(options.ORPort) { router_retry_connections(); if(retry_all_connections() < 0) { log_fn(LOG_ERR,"Failed to bind one of the listener ports."); return -1; } if(options.DirPort) { /* reload the fingerprint file */ Loading Loading
src/or/connection.c +16 −4 Original line number Diff line number Diff line Loading @@ -289,6 +289,15 @@ int connection_connect(connection_t *conn, char *address, uint32_t addr, uint16_ return 1; } static void listener_close_if_present(int type) { connection_t *conn = connection_get_by_type(type); if (conn) { close(conn->s); conn->s = -1; conn->marked_for_close = 1; } } /* start all connections that should be up but aren't */ int retry_all_connections(void) { Loading @@ -296,19 +305,22 @@ int retry_all_connections(void) { router_retry_connections(); } if(options.ORPort && !connection_get_by_type(CONN_TYPE_OR_LISTENER)) { if(options.ORPort) { listener_close_if_present(CONN_TYPE_OR_LISTENER); if(connection_create_listener(options.ORBindAddress, options.ORPort, CONN_TYPE_OR_LISTENER) < 0) return -1; } if(options.DirPort && !connection_get_by_type(CONN_TYPE_DIR_LISTENER)) { if(options.DirPort) { listener_close_if_present(CONN_TYPE_DIR_LISTENER); if(connection_create_listener(options.DirBindAddress, options.DirPort, CONN_TYPE_DIR_LISTENER) < 0) return -1; } if(options.SocksPort && !connection_get_by_type(CONN_TYPE_AP_LISTENER)) { if(options.SocksPort) { listener_close_if_present(CONN_TYPE_AP_LISTENER); if(connection_create_listener(options.SocksBindAddress, options.SocksPort, CONN_TYPE_AP_LISTENER) < 0) return -1; Loading
src/or/cpuworker.c +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ int connection_cpu_process_inbuf(connection_t *conn) { assert(conn && conn->type == CONN_TYPE_CPUWORKER); if(conn->inbuf_reached_eof) { log_fn(LOG_WARN,"Read eof. Worker dying."); log_fn(LOG_WARN,"Read eof. Worker has died."); if(conn->state != CPUWORKER_STATE_IDLE) { /* the circ associated with this cpuworker will have to wait until * it gets culled in run_connection_housekeeping(), since we have Loading
src/or/dirserv.c +5 −7 Original line number Diff line number Diff line Loading @@ -349,7 +349,6 @@ list_running_servers(char **nicknames_out) return 0; } int dirserv_dump_directory_to_string(char *s, int maxlen, crypto_pk_env_t *private_key) Loading Loading @@ -400,8 +399,7 @@ dirserv_dump_directory_to_string(char *s, int maxlen, ((int)digest[0])&0xff,((int)digest[1])&0xff, ((int)digest[2])&0xff,((int)digest[3])&0xff); strncpy(cp, "-----BEGIN SIGNATURE-----\n", maxlen-i); strncpy(cp, "-----BEGIN SIGNATURE-----\n", maxlen-i); i = strlen(s); cp = s+i; Loading
src/or/main.c +3 −2 Original line number Diff line number Diff line Loading @@ -481,8 +481,9 @@ static int do_main_loop(void) { /* no need to provide argc/v, they've been cached inside init_from_config */ exit(1); } if(options.ORPort) { router_retry_connections(); if(retry_all_connections() < 0) { log_fn(LOG_ERR,"Failed to bind one of the listener ports."); return -1; } if(options.DirPort) { /* reload the fingerprint file */ Loading