diff options
author | Mark H Weaver <mhw@netris.org> | 2017-06-26 00:00:58 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2017-06-26 00:00:58 -0400 |
commit | ed068b960eeedb92823238783779730319b8ba0e (patch) | |
tree | 36a4de280458d52520b911b2716eb5cea309fd78 /guix/store.scm | |
parent | a9308efec642bfbce480545a22fce848e6212456 (diff) | |
parent | ffc015bea26f24d862e7e877d907fbe1ab9a9967 (diff) | |
download | gnu-guix-ed068b960eeedb92823238783779730319b8ba0e.tar gnu-guix-ed068b960eeedb92823238783779730319b8ba0e.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/store.scm')
-rw-r--r-- | guix/store.scm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/guix/store.scm b/guix/store.scm index b584caa073..d1a4c67ae8 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -383,6 +383,10 @@ (connect s a) s))) +(define %default-guix-port + ;; Default port when connecting to a daemon over TCP/IP. + 44146) + (define (open-inet-socket host port) "Connect to the Unix-domain socket at HOST:PORT and return it. Raise a '&nix-connection-error' upon error." @@ -399,7 +403,9 @@ (if (number? port) (number->string port) port) (if (number? port) (logior AI_ADDRCONFIG AI_NUMERICSERV) - AI_ADDRCONFIG))) + AI_ADDRCONFIG) + 0 ;any address family + SOCK_STREAM)) ;TCP only (let loop ((addresses addresses)) (match addresses @@ -444,12 +450,8 @@ name." (open-unix-domain-socket (uri-path uri)))) ('guix (lambda (_) - (unless (uri-port uri) - (raise (condition (&nix-connection-error - (file (uri->string uri)) - (errno EBADR))))) ;bah! - - (open-inet-socket (uri-host uri) (uri-port uri)))) + (open-inet-socket (uri-host uri) + (or (uri-port uri) %default-guix-port)))) ((? symbol? scheme) ;; Try to dynamically load a module for SCHEME. ;; XXX: Errors are swallowed. |