Index: ulex/ulex.scm ================================================================== --- ulex/ulex.scm +++ ulex/ulex.scm @@ -69,20 +69,22 @@ (if (ping udata (conc ipaddr ":" port)) udata (begin (remove-captain-pkt udata captn) (setup)))) - (setup-as-captain udata)) ;; this saves the thread to captain-thread and starts the thread + (begin + (setup-as-captain udata) ;; this saves the thread to captain-thread and starts the thread + (setup))) )) ;; connect to a specific dbfile (define (connect udata dbfname dbtype) udata) (define (ping udata host-port) (let ((cookie (make-cookie udata))) - (send udata host-port 'ping "just pinging" (current-seconds)) + (send udata host-port 'ping "just pinging" (conc (current-seconds))) ;; (mailbox-rec )) ;;====================================================================== ;; network utilities @@ -428,12 +430,12 @@ (send udata host:port "iamcaptain" qrykey (if (udat-my-cpkt-key udata) "yes" "no"))) (else ;; (send-ack udata host:port qrykey) - (add-to-work-queue udata (get-peer-dat udata host:port) handlerkey qrykey data))) - (else (print "BAD DATA? handler=" handlerkey " data=" data))))) + (add-to-work-queue udata (get-peer-dat udata host:port) handlerkey qrykey data)))) + (else (print "BAD DATA? controldat=" controldat " data=" data)))) (loop state))))) ;; add a proc to the handler list (define (register-handler udata key proc) (hash-table-set! (udat-handlers udata) key proc))