diff --git a/src/Cedar/Cedar.h b/src/Cedar/Cedar.h index 1352bcea..853e361b 100644 --- a/src/Cedar/Cedar.h +++ b/src/Cedar/Cedar.h @@ -274,7 +274,7 @@ #define MAX_RETRY_INTERVAL (300 * 1000) // Maximum retry interval #define RETRY_INTERVAL_SPECIAL (60 * 1000) // Reconnection interval of a special case -#define MAX_ADDITONAL_CONNECTION_FAILED_COUNTER 16 // Allowable number that can be serially failed to additional connection +#define MAX_ADDITIONAL_CONNECTION_FAILED_COUNTER 16 // Allowable number that can be serially failed to additional connection #define ADDITIONAL_CONNECTION_COUNTER_RESET_INTERVAL (30 * 60 * 1000) // Reset period of additional connection failure counter #define MAC_MIN_LIMIT_COUNT 3 // Minimum number of MAC addresses diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c index 77f3c592..2d881d31 100644 --- a/src/Cedar/Protocol.c +++ b/src/Cedar/Protocol.c @@ -6492,7 +6492,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect, bool no_tls volatile bool *cancel_flag = NULL; void *hWnd; UINT nat_t_err = 0; - bool is_additonal_rudp_session = false; + bool is_additional_rudp_session = false; UCHAR uc = 0; IP ret_ip; // Validate arguments @@ -6508,7 +6508,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect, bool no_tls if (sess != NULL) { cancel_flag = &sess->CancelConnect; - is_additonal_rudp_session = sess->IsRUDPSession; + is_additional_rudp_session = sess->IsRUDPSession; } hWnd = c->hWndForUI; @@ -6552,7 +6552,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect, bool no_tls // If additional_connect == false, enable trying to NAT-T connection // If additional_connect == true, follow the IsRUDPSession setting in this session s = TcpIpConnectEx(host_for_direct_connection, port_for_direct_connection, - (bool *)cancel_flag, hWnd, &nat_t_err, (additional_connect ? (!is_additonal_rudp_session) : false), + (bool *)cancel_flag, hWnd, &nat_t_err, (additional_connect ? (!is_additional_rudp_session) : false), true, no_tls, &ret_ip); } } diff --git a/src/Cedar/Session.c b/src/Cedar/Session.c index 5475485a..63b1e566 100644 --- a/src/Cedar/Session.c +++ b/src/Cedar/Session.c @@ -980,7 +980,7 @@ void ClientAdditionalConnectChance(SESSION *s) return; } - if (s->IsRUDPSession && (s->Connection->AdditionalConnectionFailedCounter > MAX_ADDITONAL_CONNECTION_FAILED_COUNTER)) + if (s->IsRUDPSession && (s->Connection->AdditionalConnectionFailedCounter > MAX_ADDITIONAL_CONNECTION_FAILED_COUNTER)) { // Not to make a large amount of repeated connection retry within a certain time in the case of R-UDP session return;