rx: test for active calls in rxi_ChallengeEvent
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 25 May 2013 21:05:10 +0000 (17:05 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 4 Jun 2013 20:08:33 +0000 (13:08 -0700)
The challenge event fires when an outstanding challenge request
has not been responded to.  If there are no calls in the ACTIVE or PRECALL
state on the connection when the challenge event fires do not re-issue the
challenge.  Clients do not respond to challenges when there are no active
calls.

Change-Id: If71b49e953ca94b8bcce767b8c2a63a054d750fe
Reviewed-on: http://gerrit.openafs.org/9943
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/rx/rx.c

index 36ad89f..b819e3a 100644 (file)
@@ -6811,6 +6811,13 @@ rxi_ChallengeEvent(struct rxevent *event,
     if (event)
        rxevent_Put(&conn->challengeEvent);
 
+    /* If there are no active calls it is not worth re-issuing the
+     * challenge.  If the client issues another call on this connection
+     * the challenge can be requested at that time.
+     */
+    if (!rxi_HasActiveCalls(conn))
+        return;
+
     if (RXS_CheckAuthentication(conn->securityObject, conn) != 0) {
        struct rx_packet *packet;
        struct clock when, now;