From 99cdd9fe92a77c47ee63888f3c43e7c62cc9a448 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Tue, 21 Aug 2018 11:55:37 +0500 Subject: [PATCH] src/Cedar/Protocol: remove dead code, silence coverity --- src/Cedar/Protocol.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c index 9ea4b34d..665498e4 100644 --- a/src/Cedar/Protocol.c +++ b/src/Cedar/Protocol.c @@ -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) {