unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 27977@debbugs.gnu.org
Subject: [bug#27977] [PATCH 1/2] services: herd: Fix matching ok responses from shepherd service.
Date: Sat,  5 Aug 2017 22:30:33 +0100	[thread overview]
Message-ID: <20170805213034.1012-1-mail@cbaines.net> (raw)
In-Reply-To: <20170805222646.149cb45a@cbaines.net>

Previously the match expression case for a successful response
(where error is #f) required that the result component contained a list with a
single element.

As far as I see when looking at the responses from the shepherd, this is not
normally the case. Therefore, to avoid treating successful responses as
errors, make the match requirement more permissive, accepting any value.

* gnu/services/herd.scm (invoke-action): Change match condition for ok responses.
---
 gnu/services/herd.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index f8d60a480..49400aba4 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -146,7 +146,7 @@ result.  Otherwise return #f."
     (force-output sock)
 
     (match (read sock)
-      (('reply ('version 0 _ ...) ('result (result)) ('error #f)
+      (('reply ('version 0 _ ...) ('result result) ('error #f)
                ('messages messages))
        (for-each display-message messages)
        (cont result))
-- 
2.13.1

  reply	other threads:[~2017-08-05 21:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-05 21:26 [bug#27977] [PATCH] services: herd: Fix matching ok responses and add stop service procedure Christopher Baines
2017-08-05 21:30 ` Christopher Baines [this message]
2017-08-05 21:30   ` [bug#27977] [PATCH 2/2] services: herd: Add a stop-service procedure Christopher Baines
2017-08-08  8:14     ` Danny Milosavljevic
2017-08-08 19:53       ` bug#27977: " Christopher Baines
2017-08-08  8:16   ` [bug#27977] [PATCH 1/2] services: herd: Fix matching ok responses from shepherd service Danny Milosavljevic
2017-08-22 12:39   ` Ludovic Courtès
2017-08-22 15:52   ` Ludovic Courtès
2017-08-22 16:44     ` Christopher Baines
2017-08-22 22:30       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170805213034.1012-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=27977@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).