1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-26 19:39:53 +03:00

OpenVPN: rename generic functions

This commit is contained in:
Davide Beatrici 2018-04-04 06:22:31 +02:00
parent 3ceee41d33
commit 86c82b8ccf
2 changed files with 11 additions and 11 deletions

View File

@ -710,7 +710,7 @@ void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, O
pi = OvsParsePeerInfo(c->ClientKey.PeerInfo); pi = OvsParsePeerInfo(c->ClientKey.PeerInfo);
// Check presence of custom hostname // Check presence of custom hostname
if (OvsHasOption(pi, "UV_HOSTNAME")) if (OvsHasEntry(pi, "UV_HOSTNAME"))
{ {
StrCpy(p.ClientHostname, sizeof(p.ClientHostname), IniStrValue(pi, "UV_HOSTNAME")); StrCpy(p.ClientHostname, sizeof(p.ClientHostname), IniStrValue(pi, "UV_HOSTNAME"));
} }
@ -719,7 +719,7 @@ void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, O
StrCpy(p.ClientHostname, sizeof(p.ClientHostname), IniStrValue(pi, "IV_HWADDR")); StrCpy(p.ClientHostname, sizeof(p.ClientHostname), IniStrValue(pi, "IV_HWADDR"));
} }
OvsFreeOptions(pi); OvsFreeList(pi);
if (se->Mode == OPENVPN_MODE_L3) if (se->Mode == OPENVPN_MODE_L3)
{ {
@ -932,7 +932,7 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C
SetMdKey(c->MdRecv, c->ExpansionKey + 64, c->MdRecv->Size); SetMdKey(c->MdRecv, c->ExpansionKey + 64, c->MdRecv->Size);
SetMdKey(c->MdSend, c->ExpansionKey + 192, c->MdSend->Size); SetMdKey(c->MdSend, c->ExpansionKey + 192, c->MdSend->Size);
OvsFreeOptions(o); OvsFreeList(o);
// Generate the response option string // Generate the response option string
Format(c->ServerKey.OptionString, sizeof(c->ServerKey.OptionString), Format(c->ServerKey.OptionString, sizeof(c->ServerKey.OptionString),
@ -1055,7 +1055,7 @@ LIST *OvsParsePeerInfo(char *str)
} }
// Release the option list // Release the option list
void OvsFreeOptions(LIST *o) void OvsFreeList(LIST *o)
{ {
// Validate arguments // Validate arguments
if (o == NULL) if (o == NULL)
@ -1067,13 +1067,13 @@ void OvsFreeOptions(LIST *o)
} }
// Create an Option List // Create an Option List
LIST *OvsNewOptions() LIST *OvsNewList()
{ {
return NewListFast(NULL); return NewListFast(NULL);
} }
// Add a value to the option list // Add a value to the option list
void OvsAddOption(LIST *o, char *key, char *value) void OvsAddEntry(LIST *o, char *key, char *value)
{ {
INI_ENTRY *e; INI_ENTRY *e;
// Validate arguments // Validate arguments
@ -1105,7 +1105,7 @@ void OvsAddOption(LIST *o, char *key, char *value)
} }
// Confirm whether there is specified option key string // Confirm whether there is specified option key string
bool OvsHasOption(LIST *o, char *key) bool OvsHasEntry(LIST *o, char *key)
{ {
// Validate arguments // Validate arguments
if (o == NULL || key == NULL) if (o == NULL || key == NULL)

View File

@ -363,10 +363,10 @@ void OvsWriteStringToBuf(BUF *b, char *str, UINT max_size);
LIST *OvsParseOptions(char *str); LIST *OvsParseOptions(char *str);
LIST *OvsParsePeerInfo(char *str); LIST *OvsParsePeerInfo(char *str);
void OvsFreeOptions(LIST *o); void OvsFreeList(LIST *o);
LIST *OvsNewOptions(); LIST *OvsNewList();
void OvsAddOption(LIST *o, char *key, char *value); void OvsAddEntry(LIST *o, char *key, char *value);
bool OvsHasOption(LIST *o, char *key); bool OvsHasEntry(LIST *o, char *key);
UINT OvsPeekStringFromFifo(FIFO *f, char *str, UINT str_size); UINT OvsPeekStringFromFifo(FIFO *f, char *str, UINT str_size);
void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c); void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c);
bool OvsIsCompatibleL3IP(UINT ip); bool OvsIsCompatibleL3IP(UINT ip);