Commit 0a8a1adc authored by David Byers's avatar David Byers
Browse files

Hämta början på mappen när man blir medlem i ett nytt möte innan prompten visas igen.

Hämta mappen för möten som man blir aktiv medlem i om man redan var passiv medlem.
parent eae5f150
2000-08-15 David Byers <>
* commands1.el (lyskom-add-member-answer): Block until we get at
least one text in the map or have read the entire map.
(lyskom-add-membership): Add parameter BLOCKING to allow blocking
until we have read at least one text in the map.
* prefetch.el (lyskom-fetch-start-of-map): New function.
* lyskom-rest.el (lyskom-check-go-to-conf): Start prefetch when
converting passive membership to active membership.
2000-08-14 David Byers <>
* services.el (lyskom-server-call): Return the ref-no of the call
......@@ -524,7 +524,6 @@ is the position where the membership was placed."
(lyskom-get-error-text lyskom-errno)
(lyskom-insert-string 'done)
;;+++Borde {ndra i cachen i st{llet.
(cache-del-pers-stat (conf-stat->conf-no pers-conf-stat))
;;+++Borde {ndra i cachen i st{llet.
......@@ -537,18 +536,23 @@ is the position where the membership was placed."
(unless (membership->position mship)
(set-membership->position mship pos))
(lyskom-add-membership mship
(conf-stat->conf-no conf-conf-stat)))))))
(lyskom-insert-string 'done))))
(defun lyskom-add-membership (membership conf-no)
(defun lyskom-add-membership (membership conf-no-or-stat &optional blocking)
"Adds MEMBERSHIP to the sorted list of memberships.
Also adds to lyskom-to-do-list."
If BLOCKING is non-nil, block while reading the conference map until at
least one text has been seen. CONF-NO-OR-STAT is the conf-no to add
unless BLOCKING is t, in which cast it is the conf-stat."
(if membership
(lyskom-insert-membership membership)
(lyskom-prefetch-map conf-no membership)
(if blocking
(lyskom-fetch-start-of-map conf-no-or-stat membership)
(lyskom-prefetch-map conf-no-or-stat membership))
(lyskom-run-hook-with-args 'lyskom-add-membership-hook
(lyskom-insert-string 'conf-does-not-exist)))
......@@ -593,11 +593,11 @@ If CONF is nil, check the first conf on the to-do list."
(if (lyskom-j-or-n-p (lyskom-format 'convert-passive conf-stat))
(set-membership-type->passive type nil)
(initiate-set-membership-type 'main
(conf-stat->conf-no conf-stat)
(membership->type mship))
(blocking-do 'set-membership-type
(conf-stat->conf-no conf-stat)
(membership->type mship))
(lyskom-fetch-start-of-map conf-stat mship)
(setq continue t))
(setq continue nil))))
......@@ -174,6 +174,32 @@ This is used to prevent the prefetch code to reenter itself.")
"Return t if the while membership list has been fetched, and nil otherwise."
(eq lyskom-membership-is-read 't))
(defun lyskom-fetch-start-of-map (conf-stat membership)
"Block fetching map for MEMBERSHIP until we see a text.
Start the prefetch for the remainder of the map."
(let ((first-local (membership->last-text-read membership))
(last-local (1- (+ (conf-stat->no-of-texts conf-stat)
(conf-stat->first-local-no conf-stat))))
(done nil))
(while (not done)
(let ((map (blocking-do 'get-map
(membership->conf-no membership)
(setq first-local (+ first-local lyskom-fetch-map-nos))
(lyskom-enter-map-in-to-do-list map conf-stat membership)
(cond ((and (map->text-nos map)
(< first-local last-local)
(> (length (map->text-nos map)) 0))
(setq done t)
(lyskom-prefetch-map-using-conf-stat conf-stat
((< first-local last-local))
(t (setq done t)))))))
(defun lyskom-prefetch-conf (conf-no &optional queue)
"Prefetch the conf-stat for the conference with number CONF-NO.
If QUEUE is non-nil, put the request on it, otherwise put it on
Supports Markdown
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