You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2016/10/06 04:09:15 UTC

[trafficserver] 01/02: TS-4925: Fix static analysis check.

This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 3772683de978d85f545f3bb9afa3fca6e793c0b6
Author: James Peach <jp...@apache.org>
AuthorDate: Wed Oct 5 21:08:48 2016 -0700

    TS-4925: Fix static analysis check.
---
 mgmt/LocalManager.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index f90b342..8e91071 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -43,12 +43,14 @@ void
 LocalManager::mgmtCleanup()
 {
   close_socket(process_server_sockfd);
+  process_server_sockfd = ts::NO_FD;
 
   // fix me for librecords
 
   if (virt_map) {
     virt_map->rl_downAddrs(); // We are bailing done need to worry about table
   }
+
   closelog();
   return;
 }
@@ -441,7 +443,7 @@ LocalManager::pollMgmtProcessServer()
       }
 #endif
 
-      if (FD_ISSET(process_server_sockfd, &fdlist)) { /* New connection */
+      if (process_server_sockfd != ts::NO_FD && FD_ISSET(process_server_sockfd, &fdlist)) { /* New connection */
         struct sockaddr_in clientAddr;
         socklen_t clientLen = sizeof(clientAddr);
         int new_sockfd      = mgmt_accept(process_server_sockfd, (struct sockaddr *)&clientAddr, &clientLen);

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.