]> git.dolda2000.com Git - doldaconnect.git/commitdiff
Pass hashes to daemon when downloading.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Sun, 23 Oct 2005 02:58:16 +0000 (02:58 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Sun, 23 Oct 2005 02:58:16 +0000 (02:58 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@417 959494ce-11ee-0310-bf91-de5d638817bd

lib/guile/autodl

index f57423fcc35573ee928537c2c9d789679932851d..fef6b70e4ab1990df49b62c225c35a99ebd69d71 100755 (executable)
                      (cadr (cdr (assoc 'peer sr)))
                      (cdr (assoc 'filename sr))
                      (cdr (assoc 'size sr)))))
+      (let ((hash (assoc 'hash sr)))
+       (if (and hash (not (equal? (cdr hash) ""))) (set! args (append args (list "hash" (cdr hash))))))
       (let ((tag (assoc 'tag session)))
        (if tag (set! args (append args (list "tag" (cdr tag))))))
       (let ((uarg (assoc 'uarg session)))
     retval)
   )
 
-(define (handlesr filename fnet peer size slots resptime)
+(define (handlesr filename fnet peer size slots resptime hash)
   (let ((cl (or (assoc size sr)
                (let ((newp (cons size '()))) (set! sr (append sr (list newp))) newp)))
        (newsr (list
                (cons 'slots slots)
                (cons 'resptime resptime)
                (cons 'speed (getspeed peer))
+               (cons 'hash hash)
                (cons 'recvtime (current-time))
                (cons 'dis #f)))
        (newlist '()))
                                                        (set! lastsearch (current-time))))))
                                          ((622) ; Search result
                                           (let ((ires (list->vector (dc-intresp resp))))
-                                            (if (and ires (= (vector-ref ires 0) srchid)) (apply handlesr (map (lambda (n) (vector-ref ires n)) '(1 2 3 4 5 7))))))
+                                            (if (and ires (= (vector-ref ires 0) srchid)) (apply handlesr (map (lambda (n) (vector-ref ires n)) '(1 2 3 4 5 7 8))))))
                                          
                                          )
                                        )