(and (consp value)
(or (null remote-file-name-inhibit-cache)
(and (integerp remote-file-name-inhibit-cache)
- (time-less-p nil
- (time-add (car value)
- remote-file-name-inhibit-cache)))
+ (time-less-p
+ ;; `current-time' can be nil once we get rid of Emacs 24.
+ (current-time)
+ (time-add
+ (car value)
+ ;; `seconds-to-time' can be removed once we get
+ ;; rid of Emacs 24.
+ (seconds-to-time remote-file-name-inhibit-cache))))
(and (consp remote-file-name-inhibit-cache)
(time-less-p
remote-file-name-inhibit-cache (car value)))))
(not (tramp-file-name-equal-p
vec (car tramp-current-connection)))
(time-less-p
- (or tramp-connection-min-time-diff 0)
- (time-since (cdr tramp-current-connection))))
+ ;; `current-time' can be removed once we get rid of Emacs 24.
+ (time-since (or (cdr tramp-current-connection) (current-time)))
+ ;; `seconds-to-time' can be removed once we get rid
+ ;; of Emacs 24.
+ (seconds-to-time (or tramp-connection-min-time-diff 0))))
(throw 'suppress 'suppress))
;; If too much time has passed since last command was sent, look
;; try to send a command from time to time, then look again
;; whether the process is really alive.
(condition-case nil
- (when (and (time-less-p 60
+ ;; `seconds-to-time' can be removed once we get rid of Emacs 24.
+ (when (and (time-less-p (seconds-to-time 60)
(time-since
(tramp-get-connection-property
- p "last-cmd-time" 0)))
+ p "last-cmd-time" (seconds-to-time 0))))
(process-live-p p))
(tramp-send-command vec "echo are you awake" t t)
(unless (and (process-live-p p)
;; connection timeout.
(with-current-buffer buf
(goto-char (point-min))
- (when (and (time-less-p 60
+ ;; `seconds-to-time' can be removed once we get rid of Emacs 24.
+ (when (and (time-less-p (seconds-to-time 60)
(time-since
(tramp-get-connection-property
- p "last-cmd-time" 0)))
+ p "last-cmd-time" (seconds-to-time 0))))
(process-live-p p)
(re-search-forward tramp-smb-errors nil t))
(delete-process p)