|
@ -51,7 +51,7 @@ HANDLE startTunReadThread (struct tunread_arg *arg) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int get_best_interface_ip (n2n_edge_t * eee, dec_ip_str_t ip_addr){ |
|
|
int get_best_interface_ip (n2n_edge_t * eee, dec_ip_str_t *ip_addr){ |
|
|
DWORD interface_index = -1; |
|
|
DWORD interface_index = -1; |
|
|
DWORD dwRetVal = 0; |
|
|
DWORD dwRetVal = 0; |
|
|
PIP_ADAPTER_INFO pAdapterInfo = NULL, pAdapter = NULL; |
|
|
PIP_ADAPTER_INFO pAdapterInfo = NULL, pAdapter = NULL; |
|
@ -94,7 +94,7 @@ int get_best_interface_ip (n2n_edge_t * eee, dec_ip_str_t ip_addr){ |
|
|
traceEvent(TRACE_DEBUG, "IP Address: %s\n", pAdapter->IpAddressList.IpAddress.String); |
|
|
traceEvent(TRACE_DEBUG, "IP Address: %s\n", pAdapter->IpAddressList.IpAddress.String); |
|
|
traceEvent(TRACE_DEBUG, "IP Mask: %s\n", pAdapter->IpAddressList.IpMask.String); |
|
|
traceEvent(TRACE_DEBUG, "IP Mask: %s\n", pAdapter->IpAddressList.IpMask.String); |
|
|
traceEvent(TRACE_DEBUG, "Gateway: %s\n", pAdapter->GatewayList.IpAddress.String); |
|
|
traceEvent(TRACE_DEBUG, "Gateway: %s\n", pAdapter->GatewayList.IpAddress.String); |
|
|
strncpy(ip_addr, pAdapter->IpAddressList.IpAddress.String, sizeof(dec_ip_str_t)-1); |
|
|
strncpy(ip_addr, pAdapter->IpAddressList.IpAddress.String, sizeof(*ip_addr)); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
traceEvent(TRACE_WARNING, "GetAdaptersInfo failed with error: %d\n", dwRetVal); |
|
|
traceEvent(TRACE_WARNING, "GetAdaptersInfo failed with error: %d\n", dwRetVal); |
|
|