Enable proxy support in TCP_connection.

This commit is contained in:
irungentoo 2015-04-18 09:32:17 -04:00
parent 863b6d6f4c
commit 0886b4f7b8
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
4 changed files with 5 additions and 7 deletions

View File

@ -978,7 +978,7 @@ unsigned int tcp_copy_connected_relays(TCP_Connections *tcp_c, Node_format *tcp_
return copied;
}
TCP_Connections *new_tcp_connections(DHT *dht)
TCP_Connections *new_tcp_connections(DHT *dht, TCP_Proxy_Info *proxy_info)
{
if (dht == NULL)
return NULL;
@ -989,6 +989,8 @@ TCP_Connections *new_tcp_connections(DHT *dht)
return NULL;
temp->dht = dht;
temp->proxy_info = *proxy_info;
return temp;
}

View File

@ -185,7 +185,7 @@ int add_tcp_relay_global(TCP_Connections *tcp_c, IP_Port ip_port, const uint8_t
*/
unsigned int tcp_copy_connected_relays(TCP_Connections *tcp_c, Node_format *tcp_relays, uint16_t max_num);
TCP_Connections *new_tcp_connections(DHT *dht);
TCP_Connections *new_tcp_connections(DHT *dht, TCP_Proxy_Info *proxy_info);
void do_tcp_connections(TCP_Connections *tcp_c);
void kill_tcp_connections(TCP_Connections *tcp_c);

View File

@ -2346,7 +2346,7 @@ Net_Crypto *new_net_crypto(DHT *dht, TCP_Proxy_Info *proxy_info)
if (temp == NULL)
return NULL;
temp->tcp_c = new_tcp_connections(dht);
temp->tcp_c = new_tcp_connections(dht, proxy_info);
if (temp->tcp_c == NULL) {
free(temp);
@ -2377,8 +2377,6 @@ Net_Crypto *new_net_crypto(DHT *dht, TCP_Proxy_Info *proxy_info)
bs_list_init(&temp->ip_port_list, sizeof(IP_Port), 8);
temp->proxy_info = *proxy_info;
return temp;
}

View File

@ -200,8 +200,6 @@ typedef struct {
uint32_t current_sleep_time;
BS_LIST ip_port_list;
TCP_Proxy_Info proxy_info;
} Net_Crypto;