Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
33ae2a33
Commit
33ae2a33
authored
Apr 29, 1992
by
Linus Tolke
Browse files
Fixed one racing problem associated with the who-info-buffer.
parent
d7055be2
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
33ae2a33
Wed Apr 29 14:47:33 1992 Linus Tolke Y (linus@robert)
* cache.el (lyskom-set-who-info-buffer-2): defensive programming.
Racing conditions, (most dominant when user has user-area and
motd and a lot of presence messages) at login and this function
was called before the buffer was set.
Wed Apr 15 10:32:41 1992 Inge Wallin (inge@robert)
* cache.el(lyskom-set-who-info-buffer-2): Use insert instead of
...
...
src/async.el
View file @
33ae2a33
...
...
@@ -108,17 +108,18 @@ this function shall be with current-buffer the BUFFER."
(
set-buffer
buffer
)
(
if
(
zerop
lyskom-pers-no
)
nil
(
if
(
and
(
/=
(
who-info->pers-no
info
)
0
)
(
/=
(
who-info->pers-no
info
)
lyskom-pers-no
))
;Don't show myself.
(
initiate-get-conf-stat
'follow
'lyskom-show-changed-person
(
who-info->pers-no
info
)
(
who-info->working-conf
info
)
(
who-info->doing-what
info
)))
(
if
(
/=
(
who-info->working-conf
info
)
0
)
(
initiate-get-conf-stat
'void
nil
(
who-info->working-conf
info
)))
; This fetches the conf-stats once to much.
; (if (and (/= (who-info->pers-no info) 0)
; (/= (who-info->pers-no info) lyskom-pers-no))
; ;Don't show myself.
; (initiate-get-conf-stat 'follow
; 'lyskom-show-changed-person
; (who-info->pers-no info)
; (who-info->working-conf info)
; (who-info->doing-what info)))
; (if (/= (who-info->working-conf info) 0)
; (initiate-get-conf-stat 'void nil
; (who-info->working-conf info)))
(
cache-add-who-info
info
)))))
((
eq
msg-no
7
)
; Database is syncing.
...
...
src/cache.el
View file @
33ae2a33
...
...
@@ -259,33 +259,37 @@ ARG: session-info"
"Inserts a who-buffer-info into lyskom-who-info-cache"
;We can use lyskom-insert (not beautiful)
;we insert everything at the end of the buffer.
(
let
((
sesno
lyskom-session-no
)
min
max
(
where
(
cache-assoc
(
who-info->connection
who-info
)
lyskom-who-info-cache
)))
(
lyskom-save-excursion
(
set-buffer
lyskom-who-info-buffer
)
(
save-restriction
(
if
where
(
progn
(
narrow-to-region
(
marker-position
(
who-buffer-info->start-marker
where
))
(
1-
(
marker-position
(
who-buffer-info->end-marker
where
))))
(
delete-region
(
point-min
)
(
point-max
)))
(
goto-char
(
point-max
))
(
insert
" "
)
(
narrow-to-region
(
point-min
)
(
1-
(
point-max
))))
(
setq
min
(
point-max-marker
))
(
lyskom-print-who-info
pers-conf-stat
conf-conf-stat
who-info
sesno
'insert
)
(
setq
max
(
point-max-marker
))
(
goto-char
(
point-max
)))
(
delete-char
1
))
(
cache-add
(
who-info->connection
who-info
)
(
lyskom-create-who-buffer-info
who-info
min
max
)
'lyskom-who-info-cache
)
(
run-hooks
'lyskom-who-info-has-changed-hook
)))
;defensive programming and it will work:
(
if
(
and
lyskom-who-info-buffer-is-on
lyskom-who-info-buffer
)
(
let
((
sesno
lyskom-session-no
)
min
max
(
where
(
cache-assoc
(
who-info->connection
who-info
)
lyskom-who-info-cache
)))
(
lyskom-save-excursion
(
set-buffer
lyskom-who-info-buffer
)
(
save-restriction
(
if
where
(
progn
(
narrow-to-region
(
marker-position
(
who-buffer-info->start-marker
where
))
(
1-
(
marker-position
(
who-buffer-info->end-marker
where
))))
(
delete-region
(
point-min
)
(
point-max
)))
(
goto-char
(
point-max
))
(
insert
" "
)
(
narrow-to-region
(
point-min
)
(
1-
(
point-max
))))
(
setq
min
(
point-max-marker
))
(
lyskom-print-who-info
pers-conf-stat
conf-conf-stat
who-info
sesno
'insert
)
(
setq
max
(
point-max-marker
))
(
goto-char
(
point-max
)))
(
delete-char
1
))
(
cache-add
(
who-info->connection
who-info
)
(
lyskom-create-who-buffer-info
who-info
min
max
)
'lyskom-who-info-cache
)
(
run-hooks
'lyskom-who-info-has-changed-hook
))))
(
defun
lyskom-set-session-info
(
pers-conf-stat
conf-conf-stat
session-info
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment