viced: propagate return from CleanupTimedOutCallBacks_r 56/14256/2
authorMark Vitale <mvitale@sinenomine.net>
Thu, 25 Jun 2020 15:45:19 +0000 (11:45 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 10 Jul 2020 04:53:12 +0000 (00:53 -0400)
The fileserver's FiveMinuteCheckLWP periodically calls
CleanupTimedOutCallBacks, and logs an informational messages if the
return code indicates that any callbacks were discarded.

However, since the original IBM code import,  CleanupTimedOutCallBacks
has 1) ignored the return value from CleanupTimedOutCallBacks_r and 2)
unconditionally returned 0.  This makes the informational message
essentially dead code.

Instead, check the code from CleanupTimedOutCallBacks_r and pass it back
to the caller.

Change-Id: I631831c398e43431b79f4a3a0c6f01307ac0c05e
Reviewed-on: https://gerrit.openafs.org/14256
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/viced/callback.c

index 980d7e5..0e38a95 100644 (file)
@@ -1371,10 +1371,12 @@ BreakLaterCallBacks(void)
 int
 CleanupTimedOutCallBacks(void)
 {
+    int code;
+
     H_LOCK;
-    CleanupTimedOutCallBacks_r();
+    code = CleanupTimedOutCallBacks_r();
     H_UNLOCK;
-    return 0;
+    return code;
 }
 
 int