trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] 06/08: TS-4925: Fix static analysis check.
Date Fri, 14 Oct 2016 17:26:14 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 608ad8d7ed92fa24a6a035ff7d5f9b1c558ec255
Author: James Peach <jpeach@apache.org>
AuthorDate: Wed Oct 5 21:08:48 2016 -0700

    TS-4925: Fix static analysis check.
    
    (cherry picked from commit 3772683de978d85f545f3bb9afa3fca6e793c0b6)
---
 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" <commits@trafficserver.apache.org>.

Mime
View raw message