vos: restore status information to 'vos status'
[openafs.git] / src / rx / rx_call.c
index 2124d85..6f22ce0 100644 (file)
@@ -16,6 +16,8 @@
 #include "rx.h"
 #include "rx_call.h"
 #include "rx_conn.h"
+#include "rx_atomic.h"
+#include "rx_internal.h"
 
 struct rx_connection *
 rx_ConnectionOf(struct rx_call *call)
@@ -66,7 +68,27 @@ rx_RecordCallStatistics(struct rx_call *call, unsigned int rxInterface,
     queue = call->startTime;
     clock_Sub(&queue, &call->queueTime);
 
-    rx_IncrementTimeAndCount(call->conn->peer, rxInterface, currentFunc,
-                            totalFunc, &queue, &exec, &call->bytesSent,
-                            &call->bytesRcvd, 1);
+    rxi_IncrementTimeAndCount(call->conn->peer, rxInterface, currentFunc,
+                            totalFunc, &queue, &exec, call->app.bytesSent,
+                            call->app.bytesRcvd, 1);
+}
+
+/*
+ * Accessor for VolMonitor 'vos status'
+ * note: the rx_call members are all unsigned, but our return targets
+ * in wire struct transDebugInfo are all signed.  Sigh.
+ */
+void
+rx_GetCallStatus(struct rx_call *call, afs_int32 *readNext,
+                       afs_int32 *transmitNext, int *lastSendTime,
+                       int *lastReceiveTime)
+{
+    if (readNext != NULL)
+       *readNext = call->rnext;
+    if (transmitNext != NULL)
+       *transmitNext = call->tnext;
+    if (lastSendTime != NULL)
+       *lastSendTime = call->lastSendTime;
+    if (lastReceiveTime != NULL)
+       *lastReceiveTime = call->lastReceiveTime;
 }