Add optional arguments to ADJUST-TIMEOUT! and SESSION-ADJUST-TIMEOUT!
This argument defaults to OPTIONS-SESSION-LIFETIME and represents the life-time in seconds for the session.
This commit is contained in:
parent
5c03d2e24e
commit
909ed39ce2
|
@ -244,6 +244,7 @@
|
|||
httpd-logging ;HTTP-SYSLOG
|
||||
httpd-requests ;requests from httpd
|
||||
httpd-responses ;replies for httpd
|
||||
let-opt ;:OPTIONAL
|
||||
locks ;MAKE-LOCK et al.
|
||||
profiling ;PROFILE-SPACE
|
||||
rt-module-language ;get structures dynamically
|
||||
|
|
|
@ -323,7 +323,12 @@
|
|||
|
||||
;;; SESSION-ADJUST-TIMEOUT!
|
||||
;; Resets time-to-die of session indicated by its SESSION-ID number.
|
||||
(define (session-adjust-timeout! session-id)
|
||||
(define (session-adjust-timeout! session-id . maybe-time-to-live)
|
||||
(really-session-adjust-timeout!
|
||||
session-id
|
||||
(:optional maybe-time-to-live (options-session-lifetime))))
|
||||
|
||||
(define (really-session-adjust-timeout! session-id time-to-live)
|
||||
(obtain-lock *session-table-lock*)
|
||||
(let* ((session (table-ref *session-table* session-id))
|
||||
(memo (session-memo session))
|
||||
|
@ -339,9 +344,13 @@
|
|||
(release-lock *session-table-lock*))
|
||||
|
||||
;;; ADJUST-TIMEOUT!
|
||||
;; Resets time-to-die of current session.
|
||||
(define (adjust-timeout!)
|
||||
(session-adjust-timeout! (instance-session-id)))
|
||||
;; Resets time-to-die of current session. The argument must be
|
||||
;; optional as PLT does not have it.
|
||||
(define (adjust-timeout! . maybe-time-to-live)
|
||||
(really-session-adjust-timeout!
|
||||
(instance-session-id)
|
||||
(:optional maybe-time-to-live
|
||||
(options-session-lifetime))))
|
||||
|
||||
;;; RESET-SESSION-TABLE!
|
||||
;; Clears the *SESSION-TABLE* (locking)
|
||||
|
|
Loading…
Reference in New Issue