Cleaned up redundant comments in dcc_listen_init by removing obvious/explanatory noise and an obsolete commented-out debug printf, while leaving logic unchanged.

This commit is contained in:
2026-02-25 02:07:38 -07:00
parent dc6453e230
commit e58bf2be22

View File

@@ -1660,17 +1660,14 @@ dcc_listen_init (struct DCC *dcc, session *sess)
SAddr.sin_family = AF_INET;
/*if local_ip is specified use that*/
if (prefs.local_ip != 0xffffffff)
{
my_addr = prefs.local_ip;
SAddr.sin_addr.s_addr = prefs.local_ip;
}
/*otherwise use the default*/
else
my_addr = SAddr.sin_addr.s_addr;
/*if we have a valid portrange try to use that*/
if (prefs.hex_dcc_port_first > 0)
{
SAddr.sin_port = 0;
@@ -1680,7 +1677,6 @@ dcc_listen_init (struct DCC *dcc, session *sess)
{
SAddr.sin_port = htons (prefs.hex_dcc_port_first + i);
i++;
/*printf("Trying to bind against port: %d\n",ntohs(SAddr.sin_port));*/
bindretval = bind (dcc->sok, (struct sockaddr *) &SAddr, sizeof (SAddr));
}
@@ -1707,12 +1703,8 @@ dcc_listen_init (struct DCC *dcc, session *sess)
dcc->port = ntohs (SAddr.sin_port);
/*if we have a dcc_ip, we use that, so the remote client can connect*/
/*else we try to take an address from hex_dcc_ip*/
/*if something goes wrong we tell the client to connect to our LAN ip*/
dcc->addr = dcc_get_my_address (sess);
/*if nothing else worked we use the address we bound to*/
if (dcc->addr == 0)
dcc->addr = my_addr;