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

Cedar/Proto: rename "ProtoNewSession()" to "ProtoSessionNew()" and "ProtoDeleteSession()" to "ProtoSessionDelete()"

For consistency.

Also, the "proto" argument is now marked as const.
This commit is contained in:
Davide Beatrici 2020-08-06 02:41:13 +02:00
parent 712c51a971
commit a8c6a0c1b3
2 changed files with 7 additions and 7 deletions

View File

@ -196,7 +196,7 @@ void ProtoDelete(PROTO *proto)
for (i = 0; i < HASH_LIST_NUM(proto->Sessions); ++i) for (i = 0; i < HASH_LIST_NUM(proto->Sessions); ++i)
{ {
ProtoDeleteSession(LIST_DATA(proto->Sessions->AllList, i)); ProtoSessionDelete(LIST_DATA(proto->Sessions->AllList, i));
} }
ReleaseHashList(proto->Sessions); ReleaseHashList(proto->Sessions);
@ -325,7 +325,7 @@ const PROTO_CONTAINER *ProtoDetect(const PROTO *proto, const PROTO_MODE mode, co
return NULL; return NULL;
} }
PROTO_SESSION *ProtoNewSession(PROTO *proto, const PROTO_CONTAINER *container, const IP *src_ip, const USHORT src_port, const IP *dst_ip, const USHORT dst_port) PROTO_SESSION *ProtoSessionNew(const PROTO *proto, const PROTO_CONTAINER *container, const IP *src_ip, const USHORT src_port, const IP *dst_ip, const USHORT dst_port)
{ {
LIST *options; LIST *options;
PROTO_SESSION *session; PROTO_SESSION *session;
@ -376,7 +376,7 @@ PROTO_SESSION *ProtoNewSession(PROTO *proto, const PROTO_CONTAINER *container, c
return session; return session;
} }
void ProtoDeleteSession(PROTO_SESSION *session) void ProtoSessionDelete(PROTO_SESSION *session)
{ {
if (session == NULL) if (session == NULL)
{ {
@ -632,7 +632,7 @@ void ProtoHandleDatagrams(UDPLISTENER *listener, LIST *datagrams)
continue; continue;
} }
session = ProtoNewSession(proto, container, &tmp.SrcIp, tmp.SrcPort, &tmp.DstIp, tmp.DstPort); session = ProtoSessionNew(proto, container, &tmp.SrcIp, tmp.SrcPort, &tmp.DstIp, tmp.DstPort);
if (session == NULL) if (session == NULL)
{ {
continue; continue;
@ -659,7 +659,7 @@ void ProtoHandleDatagrams(UDPLISTENER *listener, LIST *datagrams)
if (session->Halt) if (session->Halt)
{ {
DeleteHash(sessions, session); DeleteHash(sessions, session);
ProtoDeleteSession(session); ProtoSessionDelete(session);
continue; continue;
} }

View File

@ -94,8 +94,8 @@ void ProtoContainerDelete(PROTO_CONTAINER *container);
const PROTO_CONTAINER *ProtoDetect(const PROTO *proto, const PROTO_MODE mode, const UCHAR *data, const UINT size); const PROTO_CONTAINER *ProtoDetect(const PROTO *proto, const PROTO_MODE mode, const UCHAR *data, const UINT size);
PROTO_SESSION *ProtoNewSession(PROTO *proto, const PROTO_CONTAINER *container, const IP *src_ip, const USHORT src_port, const IP *dst_ip, const USHORT dst_port); PROTO_SESSION *ProtoSessionNew(const PROTO *proto, const PROTO_CONTAINER *container, const IP *src_ip, const USHORT src_port, const IP *dst_ip, const USHORT dst_port);
void ProtoDeleteSession(PROTO_SESSION *session); void ProtoSessionDelete(PROTO_SESSION *session);
bool ProtoSetListenIP(PROTO *proto, const IP *ip); bool ProtoSetListenIP(PROTO *proto, const IP *ip);
bool ProtoSetUdpPorts(PROTO *proto, const LIST *ports); bool ProtoSetUdpPorts(PROTO *proto, const LIST *ports);