guix-commits
[Top][All Lists]
Advanced

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

03/13: services: dovecot: Only serialize settings with non-empty values.


From: guix-commits
Subject: 03/13: services: dovecot: Only serialize settings with non-empty values.
Date: Fri, 11 Sep 2020 10:40:50 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit a16400919f9e589b7161372c3c97f56b5cf52091
Author: Alexey Abramov <levenson@mmer.org>
AuthorDate: Tue Sep 8 15:53:44 2020 +0200

    services: dovecot: Only serialize settings with non-empty values.
    
    * gnu/services/mail.scm (serialize-space-separated-string-list): Protocols
    might have custom settings, which are not supported by other protocols. To
    prevent dovecot/services from crashing, serialize settings that hold 
non-empty
    values only.
    
    Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
---
 gnu/services/mail.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 3029a68..291a2db 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -99,7 +99,9 @@
                   (and (string? x) (not (string-index x #\space))))
                 val)))
 (define (serialize-space-separated-string-list field-name val)
-  (serialize-field field-name (string-join val " ")))
+  (match val
+    (() #f)
+    (_ (serialize-field field-name (string-join val " ")))))
 
 (define (comma-separated-string-list? val)
   (and (list? val)



reply via email to

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