mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
src/Cedar/Protocol: remove dead code, silence coverity
This commit is contained in:
parent
c98c7858bd
commit
99cdd9fe92
@ -5645,7 +5645,7 @@ void ClientUploadNoop(CONNECTION *c)
|
||||
|
||||
p = PackError(0);
|
||||
PackAddInt(p, "noop", 1);
|
||||
HttpClientSend(c->FirstSock, p);
|
||||
(void)HttpClientSend(c->FirstSock, p);
|
||||
FreePack(p);
|
||||
|
||||
p = HttpClientRecv(c->FirstSock);
|
||||
@ -5942,15 +5942,12 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
|
||||
UINT num = 0, max = 19;
|
||||
SERVER *server;
|
||||
char *vpn_http_target = HTTP_VPN_TARGET2;
|
||||
bool check_hostname = false;
|
||||
// Validate arguments
|
||||
if (c == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
server = c->Cedar->Server;
|
||||
|
||||
s = c->FirstSock;
|
||||
@ -5977,33 +5974,6 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (check_hostname && (StrCmpi(h->Version, "HTTP/1.1") == 0 || StrCmpi(h->Version, "HTTP/1.2") == 0))
|
||||
{
|
||||
HTTP_VALUE *v;
|
||||
char hostname[64];
|
||||
|
||||
Zero(hostname, sizeof(hostname));
|
||||
|
||||
v = GetHttpValue(h, "Host");
|
||||
if (v != NULL)
|
||||
{
|
||||
StrCpy(hostname, sizeof(hostname), v->Data);
|
||||
}
|
||||
|
||||
if (IsEmptyStr(hostname))
|
||||
{
|
||||
// Invalid hostname
|
||||
HttpSendInvalidHostname(s, h->Target);
|
||||
FreeHttpHeader(h);
|
||||
c->Err = ERR_CLIENT_IS_NOT_VPN;
|
||||
*error_detail_str = "Invalid_hostname";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Interpret
|
||||
if (StrCmpi(h->Method, "POST") == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user