mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user