Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 8c873a94 authored by rswindell's avatar rswindell
Browse files

The log msg "passthru socket listening on port n" was always wrong

(said port 0) since the port had not been bound yet.
So fix the display order of that msg (after listen() is called)
and lower the log level to debug.
parent a00f0116
......@@ -5776,7 +5776,15 @@ NO_SSH:
close_socket(tmp_sock);
goto NO_PASSTHRU;
}
lprintf(LOG_INFO,"Node %d passthru socket listening on port %u"
tmp_addr_len=sizeof(tmp_addr);
if(getsockname(tmp_sock, (struct sockaddr *)&tmp_addr, &tmp_addr_len)) {
lprintf(LOG_ERR,"Node %d !ERROR %d getting passthru listener address"
,new_node->cfg.node_num, ERROR_VALUE);
close_socket(tmp_sock);
goto NO_PASSTHRU;
}
lprintf(LOG_DEBUG,"Node %d passthru socket listening on port %u"
,new_node->cfg.node_num, htons(tmp_addr.sin_port));
new_node->passthru_socket = open_socket(PF_INET, SOCK_STREAM, "passthru");
......@@ -5791,16 +5799,6 @@ NO_SSH:
lprintf(LOG_DEBUG,"Node %d passthru connect socket %d opened"
,new_node->cfg.node_num, new_node->passthru_socket);
tmp_addr_len=sizeof(tmp_addr);
if(getsockname(tmp_sock, (struct sockaddr *)&tmp_addr, &tmp_addr_len)) {
lprintf(LOG_ERR,"Node %d !ERROR %d getting passthru listener address"
,new_node->cfg.node_num, ERROR_VALUE);
close_socket(tmp_sock);
close_socket(new_node->passthru_socket);
new_node->passthru_socket=INVALID_SOCKET;
goto NO_PASSTHRU;
}
result = connect(new_node->passthru_socket, (struct sockaddr *)&tmp_addr, tmp_addr_len);
if(result != 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment