X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Fguile%2Fautodl;h=632e7efc818cb54f6a9bfd8f6a6366ef67447986;hb=9de0d082eb31c6c4b261721b25c187c7f204c163;hp=f796176441e0cef33e84d235e150dcf7254a99f5;hpb=f7bc13915e125177524aae0c4328698ae6e9eaf7;p=doldaconnect.git diff --git a/lib/guile/autodl b/lib/guile/autodl index f796176..632e7ef 100755 --- a/lib/guile/autodl +++ b/lib/guile/autodl @@ -326,6 +326,9 @@ ) (define (handlesr filename fnet peer size slots resptime hash) + (if (eq? (cdr (assoc 'search-mode session)) 'wait) + (begin (set-cdr! (assoc 'search-mode session) 'normal) + (logf "reverting to normal mode"))) (let ((cl (or (assoc size sr) (let ((newp (cons size '()))) (set! sr (append sr (list newp))) newp))) (newsr (list @@ -419,7 +422,7 @@ (if (not (assoc 'maxtrans session)) (set! session (cons '(maxtrans . 1) session))) (if (not (assoc 'search-mode session)) - (set! session (cons '(search-mode . wait) session))) + (set! session (cons '(search-mode . normal) session))) (if (not (validate-session session)) (begin (display "Invalid session!\n" (current-error-port)) (exit 1))) (if (not dc-server) (set! dc-server (getenv "DCSERVER"))) (if (not dc-server) (set! dc-server "localhost")) @@ -515,8 +518,6 @@ (write-info-file))))) ((622) ; Search result (let ((ires (list->vector (dc-intresp resp)))) - (if (eq? (cdr (assoc 'search-mode session)) 'wait) - (set-cdr! (assoc 'search-mode session) 'normal)) (if (and ires (= (vector-ref ires 0) srchid)) (apply handlesr (map (lambda (n) (vector-ref ires n)) '(1 2 3 4 5 7 8)))))) )