conn->nSpecific = 0;
conn->specific = NULL;
rx_SetConnDeadTime(conn, service->connDeadTime);
+ rx_SetConnIdleDeadTime(conn, service->idleDeadTime);
/* Notify security object of the new connection */
RXS_NewConnection(conn->securityObject, conn);
/* XXXX Connection timeout? */
#endif /* RX_ENABLE_LOCKS */
{
register struct rx_connection *conn = call->conn;
- register struct rx_service *tservice;
afs_uint32 now;
afs_uint32 deadTime;
* attached process can die reasonably gracefully. */
}
/* see if we have a non-activity timeout */
- tservice = conn->service;
- if ((conn->type == RX_SERVER_CONNECTION) && call->startWait
- && tservice->idleDeadTime
- && ((call->startWait + tservice->idleDeadTime) < now)) {
+ if (call->startWait && conn->idleDeadTime
+ && ((call->startWait + conn->idleDeadTime) < now)) {
if (call->state == RX_STATE_ACTIVE) {
rxi_CallError(call, RX_CALL_TIMEOUT);
return -1;
/* Enable or disable asymmetric client checking for a service */
#define rx_SetCheckReach(service, x) ((service)->checkReach = (x))
-/* Set connection hard timeout for a connection */
+/* Set connection hard and idle timeouts for a connection */
#define rx_SetConnHardDeadTime(conn, seconds) ((conn)->hardDeadTime = (seconds))
+#define rx_SetConnIdleDeadTime(conn, seconds) ((conn)->idleDeadTime = (seconds))
/* Set the overload threshold and the overload error */
#define rx_SetBusyThreshold(threshold, code) (rx_BusyThreshold=(threshold),rx_BusyError=(code))
int lastSendTime; /* Last send time for this connection */
u_short secondsUntilDead; /* Maximum silence from peer before RX_CALL_DEAD */
u_short hardDeadTime; /* hard max for call execution */
+ 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 */
int nSpecific; /* number entries in specific data */