Commit 617bab23 authored by Pontus Freyhult's avatar Pontus Freyhult

Fixes issue with automatic use of wrong identity when connecting to new...

Fixes issue with automatic use of wrong identity when connecting to new servers after automatic reconnect.
parent c1eb893b
2009-05-09 Pontus Freyhult <pont@soua.net>
* vars.el.in (lyskom-default-password): Fixed typo.
* startup.el (kom-start-anew): Only store password in
lyskom-default-password if requested (kom-remember-password),
instead of keeping it there and clearing it if not desired..
2009-05-08 Pontus Freyhult <pont@soua.net>
* command.el (lyskom-start-of-command): No longer protect obsolete
variable lyskom-default-username.
* vars.el.in (kom-default-password): Removed lyskom-default-username.
* startup.el (lyskom): Get rid of lyskom-default-username. Pass
username and password to kom-start-anew instead.
* startup.el (kom-start-anew): Use parameter username instead
of lyskom-default-username. Use password for input password (if
any).
2009-03-08 David Byers <davby@ida.liu.se>
Add access to command descriptions:
......
......@@ -594,14 +594,13 @@ chosen according to this"
(if (or (eq t kom-relogin-behaviour)
(and (eq 'ask kom-relogin-behaviour)
(lyskom-j-or-n-p (lyskom-get-string 'resurrect-session))))
(let ((lyskom-default-user-name lyskom-default-user-name))
(lyskom (if (= 4894 lyskom-server-port) ; Should we do this different?
lyskom-server-name
(concat lyskom-server-name
":"
(int-to-string lyskom-server-port)))
lyskom-pers-no
lyskom-default-password))
(lyskom (if (= 4894 lyskom-server-port) ; Should we do this different?
lyskom-server-name
(concat lyskom-server-name
":"
(int-to-string lyskom-server-port)))
lyskom-pers-no
lyskom-default-password)
(lyskom-error "%s" (lyskom-get-string 'dead-session)))))
(if (and lyskom-is-waiting
......
......@@ -90,7 +90,6 @@ clients of the event. See lyskom-mode for details on lyskom."
(run-hooks 'lyskom-init-hook)
(setq username
(or username
lyskom-default-user-name
kom-default-user-name
(getenv "KOMNAME")))
(setq password
......@@ -243,8 +242,6 @@ clients of the event. See lyskom-mode for details on lyskom."
(switch-to-buffer buffer)
(lyskom-mode) ;Clearing lyskom-default...
(setq lyskom-buffer buffer)
(setq lyskom-default-user-name username)
(setq lyskom-default-password password)
(setq lyskom-server-name host)
(setq lyskom-server-port port)
(setq lyskom-proc proc)
......@@ -348,7 +345,7 @@ clients of the event. See lyskom-mode for details on lyskom."
;; Can't use lyskom-end-of-command here.
(setq lyskom-executing-command nil)
;; Log in
(kom-start-anew t session-priority invisiblep)
(kom-start-anew t session-priority invisiblep username password)
(if (memq lyskom-buffer lyskom-buffer-list)
(while (not (eq lyskom-buffer (car lyskom-buffer-list)))
(setq lyskom-buffer-list
......@@ -537,7 +534,7 @@ clients of the event. See lyskom-mode for details on lyskom."
;;; Start anew
(defun kom-start-anew (&optional lyskom-first-time-around session-priority invisiblep)
(defun kom-start-anew (&optional lyskom-first-time-around session-priority invisiblep username password)
"Start/login as a new person. If INVISIBLEP is not nil, the login will not be
shown to other users."
(interactive)
......@@ -560,13 +557,13 @@ shown to other users."
(while (not new-me)
(if (and lyskom-first-time-around
lyskom-default-user-name)
username)
;; This is nil if we can't find a unique match.
(setq new-me
(if (integerp lyskom-default-user-name)
lyskom-default-user-name
(if (integerp username)
username
(conf-z-info->conf-no
(lyskom-lookup-conf-by-name lyskom-default-user-name
(lyskom-lookup-conf-by-name username
'(pers))))))
(if new-me
nil
......@@ -601,9 +598,8 @@ shown to other users."
(lyskom-insert (concat (conf-stat->name conf-stat) "\n"))
(setq lyskom-first-time-around nil)
(if (blocking-do 'login new-me
(setq lyskom-default-password
(if lyskom-default-password
lyskom-default-password
(setq password
(or password
;; Use password read when creating
;; the person when loggin in new
;; users
......@@ -648,8 +644,8 @@ shown to other users."
(unless lyskom-dont-read-user-area
(setq ignored-user-area-vars (lyskom-read-options)))
(unless kom-remember-password
(setq lyskom-default-password nil))
(if kom-remember-password
(setq lyskom-default-password password))
;Update mode-line string if needed (as early as possible).
......
......@@ -4928,11 +4928,6 @@ user with that name.
Overrides the environment variable `KOMNAME'."
local)
(def-kom-var lyskom-default-user-name nil
"**This variable is reserved for internal use. See
`kom-default-user-name' instead."
local)
(def-kom-var kom-default-password nil
"**Default LysKOM password.
......@@ -4941,7 +4936,7 @@ environment variable `KOMPASSWORD' \(which should never be used)."
local)
(def-kom-var lyskom-default-password nil
"**This variable is resvered for internal use. See
"**This variable is reserved for internal use. See
`kom-default-password' instead."
local)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment