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-logging ;HTTP-SYSLOG
|
||||||
httpd-requests ;requests from httpd
|
httpd-requests ;requests from httpd
|
||||||
httpd-responses ;replies for httpd
|
httpd-responses ;replies for httpd
|
||||||
|
let-opt ;:OPTIONAL
|
||||||
locks ;MAKE-LOCK et al.
|
locks ;MAKE-LOCK et al.
|
||||||
profiling ;PROFILE-SPACE
|
profiling ;PROFILE-SPACE
|
||||||
rt-module-language ;get structures dynamically
|
rt-module-language ;get structures dynamically
|
||||||
|
|
|
@ -323,7 +323,12 @@
|
||||||
|
|
||||||
;;; SESSION-ADJUST-TIMEOUT!
|
;;; SESSION-ADJUST-TIMEOUT!
|
||||||
;; Resets time-to-die of session indicated by its SESSION-ID number.
|
;; 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*)
|
(obtain-lock *session-table-lock*)
|
||||||
(let* ((session (table-ref *session-table* session-id))
|
(let* ((session (table-ref *session-table* session-id))
|
||||||
(memo (session-memo session))
|
(memo (session-memo session))
|
||||||
|
@ -339,9 +344,13 @@
|
||||||
(release-lock *session-table-lock*))
|
(release-lock *session-table-lock*))
|
||||||
|
|
||||||
;;; ADJUST-TIMEOUT!
|
;;; ADJUST-TIMEOUT!
|
||||||
;; Resets time-to-die of current session.
|
;; Resets time-to-die of current session. The argument must be
|
||||||
(define (adjust-timeout!)
|
;; optional as PLT does not have it.
|
||||||
(session-adjust-timeout! (instance-session-id)))
|
(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!
|
;;; RESET-SESSION-TABLE!
|
||||||
;; Clears the *SESSION-TABLE* (locking)
|
;; Clears the *SESSION-TABLE* (locking)
|
||||||
|
|
Loading…
Reference in New Issue