From: Andrew Deason Date: Thu, 30 Jan 2014 06:36:22 +0000 (-0600) Subject: rx: Remove idleDeadDetection X-Git-Tag: openafs-stable-1_8_0pre1~361 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=846f2c8eae4968d1c400d18ec66ca1daf5fdef02 rx: Remove idleDeadDetection After change Ie0497d24f1bf4ad7d30ab59061f96c3298f47d17, testing for idleDeadDetection is equivalent to testing if idleDeadTime is non-zero. The idleDeadDetection field is thus redundant, so remove it. Change-Id: Id11f2829167f4de1505cee286dcc7c56b431a5a6 Reviewed-on: http://gerrit.openafs.org/10782 Reviewed-by: Benjamin Kaduk Reviewed-by: Daria Brashear Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 045aab3..63859eb 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -1137,7 +1137,6 @@ void rx_SetConnIdleDeadTime(struct rx_connection *conn, int seconds) { conn->idleDeadTime = seconds; - conn->idleDeadDetection = (seconds ? 1 : 0); rxi_CheckConnTimeouts(conn); } @@ -6390,20 +6389,18 @@ rxi_CheckCall(struct rx_call *call, int haveCTLock) * attached process can die reasonably gracefully. */ } - if (conn->idleDeadDetection) { - if (conn->idleDeadTime) { - idleDeadTime = conn->idleDeadTime + fudgeFactor; - } + if (conn->idleDeadTime) { + idleDeadTime = conn->idleDeadTime + fudgeFactor; + } - if (idleDeadTime) { - /* see if we have a non-activity timeout */ - if (call->startWait && ((call->startWait + idleDeadTime) < now)) { - if (call->state == RX_STATE_ACTIVE) { - cerror = RX_CALL_TIMEOUT; - goto mtuout; - } - } - } + if (idleDeadTime) { + /* see if we have a non-activity timeout */ + if (call->startWait && ((call->startWait + idleDeadTime) < now)) { + if (call->state == RX_STATE_ACTIVE) { + cerror = RX_CALL_TIMEOUT; + goto mtuout; + } + } } if (conn->hardDeadTime) { @@ -6614,7 +6611,7 @@ rxi_GrowMTUEvent(struct rxevent *event, void *arg1, void *dummy, int dummy2) */ if ((conn->peer->maxPacketSize != 0) && (conn->peer->natMTU < RX_MAX_PACKET_SIZE) && - conn->idleDeadDetection) + conn->idleDeadTime) (void)rxi_SendAck(call, NULL, 0, RX_ACK_MTU, 0); rxi_ScheduleGrowMTUEvent(call, 0); MUTEX_EXIT(&call->lock); diff --git a/src/rx/rx_conn.h b/src/rx/rx_conn.h index 5007684..60ae977 100644 --- a/src/rx/rx_conn.h +++ b/src/rx/rx_conn.h @@ -72,7 +72,6 @@ struct rx_connection { u_short idleDeadTime; /* max time a call can be idle (no data) */ u_char ackRate; /* how many packets between ack requests */ u_char makeCallWaiters; /* how many rx_NewCalls are waiting */ - u_char idleDeadDetection; /* detect idle dead timeouts? */ afs_int32 secondsUntilNatPing; /* how often to ping conn */ struct rxevent *natKeepAliveEvent; /* Scheduled to keep connection open */ afs_int32 msgsizeRetryErr;