Repository: trafficserver
Updated Branches:
  refs/heads/master 996050e19 -> 75db8218c


TS-3287: Fix use of uninitialized variable

This was refactored in this issue but caused warnings


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/75db8218
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/75db8218
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/75db8218

Branch: refs/heads/master
Commit: 75db8218cf32e0c9a62cebd3229c0176a4e4f5e6
Parents: 996050e
Author: Phil Sorber <[email protected]>
Authored: Fri Jan 30 06:41:41 2015 -0700
Committer: Phil Sorber <[email protected]>
Committed: Fri Jan 30 06:41:41 2015 -0700

----------------------------------------------------------------------
 mgmt/cluster/ClusterCom.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/75db8218/mgmt/cluster/ClusterCom.cc
----------------------------------------------------------------------
diff --git a/mgmt/cluster/ClusterCom.cc b/mgmt/cluster/ClusterCom.cc
index a5a93b0..80e212e 100644
--- a/mgmt/cluster/ClusterCom.cc
+++ b/mgmt/cluster/ClusterCom.cc
@@ -59,7 +59,6 @@ drainIncomingChannel_broadcast(void *arg)
 
   time_t t;
   time_t last_multicast_receive_time = time(NULL);
-  struct timeval tv;
 
   /* Avert race condition, thread spun during constructor */
   while (lmgmt->ccom != ccom || !lmgmt->ccom->init) {
@@ -85,7 +84,7 @@ drainIncomingChannel_broadcast(void *arg)
         last_multicast_receive_time = time(NULL);       // valid multicast msg
       } else {
         t = time(NULL);
-        if ((t - last_multicast_receive_time) > (tv.tv_sec - 1)) {
+        if ((t - last_multicast_receive_time) > ccom->mc_poll_timeout) {
           // Timeout on multicast receive channel, reset channel.
           if (ccom->receive_fd > 0) {
             close(ccom->receive_fd);

Reply via email to