services: ntp: Fix a crash when using legacy configuration.
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Fri, 1 Nov 2019 03:20:22 +0000 (23:20 -0400)
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>
Fri, 1 Nov 2019 03:37:47 +0000 (23:37 -0400)
commitf37ad658eada78384764c7d6db3a7f3ad8ad283e
tree136698f9f974e3ac4ed51bd4344b80eb22eda3a1
parent28d46d9d4317180b348ad5baeddad8ef25ed430a
services: ntp: Fix a crash when using legacy configuration.

Fixes issue #37504 (see: https://bugs.gnu.org/37504).

The bug was caused by the fact that destructuring an <ntp-configuration>
record using match would bind the 'servers' field without using the
compatibility accessor.

* gnu/services/networking.scm (ntp-shepherd-service): Replace `match-lambda'
by distinct `lambda' and `match' calls, so that the 'servers' field can be
generated by applying the `ntp-configuration-servers' procedure to the
configuration object.
gnu/services/networking.scm