diff options
author | Marius Bakke <marius@gnu.org> | 2020-12-21 23:42:10 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-12-21 23:42:10 +0100 |
commit | bbe4ed65ed5fe7dc8ed9d226042852387cee3b1e (patch) | |
tree | 9fbf0642fe71d0d4f6d7cb4e85b4d1587c8b9b16 /guix/avahi.scm | |
parent | 034cfbd2449387c15823cd9ec3e91661f9e5bf49 (diff) | |
parent | f00e68ace070fd5240a4b5874e61c26f6e909b6c (diff) | |
download | guix-patches-bbe4ed65ed5fe7dc8ed9d226042852387cee3b1e.tar guix-patches-bbe4ed65ed5fe7dc8ed9d226042852387cee3b1e.tar.gz |
Merge branch 'master' into ungrafting
Diffstat (limited to 'guix/avahi.scm')
-rw-r--r-- | guix/avahi.scm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/guix/avahi.scm b/guix/avahi.scm index aa90a5cdd4..132e42f268 100644 --- a/guix/avahi.scm +++ b/guix/avahi.scm @@ -89,13 +89,19 @@ when STOP-LOOP? procedure returns true." (close-port socket) ip)) +(define never + ;; Never true. + (const #f)) + (define* (avahi-browse-service-thread proc #:key types (ignore-local? #t) (family AF_INET) - (stop-loop? (const #f)) - (timeout 100)) + (stop-loop? never) + (timeout (if (eq? stop-loop? never) + #f + 100))) "Browse services which type is part of the TYPES list, using Avahi. The search is restricted to services with the given FAMILY. Each time a service is found or removed, PROC is called and passed as argument the corresponding @@ -167,4 +173,6 @@ when STOP-LOOP? procedure returns true." client-callback))) (and (client? client) (while (not (stop-loop?)) - (iterate-simple-poll poll timeout))))) + (if timeout + (iterate-simple-poll poll timeout) + (iterate-simple-poll poll)))))) |