guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

21/197: installer: Fix incorrect host in ping task.


From: Danny Milosavljevic
Subject: 21/197: installer: Fix incorrect host in ping task.
Date: Mon, 3 Jul 2017 20:36:53 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit 6630530aef471d439af7398501f5cf25a535d45f
Author: John Darrington <address@hidden>
Date:   Fri Dec 23 20:45:23 2016 +0100

    installer: Fix incorrect host in ping task.
    
    * gnu/system/installer/ping.scm (ping-page-key-handler): Use host part of 
uri
    only.  Commit cd6fd079e61c07135902b673991164ba705c037c inadvertently 
introduced
    this bug.
---
 gnu/system/installer/ping.scm | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gnu/system/installer/ping.scm b/gnu/system/installer/ping.scm
index fb00292..2adee6f 100644
--- a/gnu/system/installer/ping.scm
+++ b/gnu/system/installer/ping.scm
@@ -24,7 +24,7 @@
   #:use-module (guix store)
   #:use-module (gurses buttons)
   #:use-module (ncurses curses)
-
+  #:use-module (web uri)
   #:export (ping-page-refresh)
   #:export (ping-page-key-handler))
 
@@ -45,10 +45,10 @@
       (cond
        ((eqv? (buttons-selected nav) (1- (buttons-n-buttons nav)))
        (buttons-unselect-all nav))
-       
+
        (else
        (buttons-select-next nav))))
-     
+
      ((eq? ch KEY_LEFT)
       (buttons-select-prev nav))
 
@@ -62,17 +62,20 @@
       (delwin (page-datum page 'test-window))
       (set! page-stack (cdr page-stack))
       )
-     
-     ((buttons-key-matches-symbol? nav ch 'test)
 
-      (let* ();;(windowp (make-window-port test-window)))
+     ((buttons-key-matches-symbol? nav ch 'test)
+      (let* ()
        (if (zero?
-            (window-pipe test-window  "ping" "ping" "-c" "3" (car 
%default-substitute-urls)))
+            (window-pipe test-window  "ping" "ping" "-c" "3"
+                          (uri-host
+                           (string->uri
+                            (car %default-substitute-urls)))))
+
            (addstr test-window
                    (gettext "Test successful.  Network is working."))
            (addstr test-window
                    (gettext "Test failed. No servers reached.")))
-     
+
        (refresh test-window)))) #f))
 
 (define (ping-page-refresh page)
@@ -113,6 +116,3 @@
     (buttons-post buttons button-window)
     (refresh text-window)
     (refresh button-window)))
-
-                             
-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]