From fe124b79cce3a6e6d74fff05d7e48a055890a203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 22 Aug 2018 22:50:44 +0300 Subject: [PATCH] MXS-1929: Fix state of services created at runtime If a service was created at runtime, it would be in the Allocated state until it was stopped. The serviceStart function isn't necessary from a functional point of view (a new service cannot have listeners that need starting) but it does set the correct state and it's the "right" thing to do. --- server/core/config_runtime.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/core/config_runtime.cc b/server/core/config_runtime.cc index e15f56ee2..fca7e5722 100644 --- a/server/core/config_runtime.cc +++ b/server/core/config_runtime.cc @@ -1998,6 +1998,11 @@ Service* runtime_create_service_from_json(json_t* json) runtime_destroy_service(rval); rval = NULL; } + else + { + // This function sets the service in the correct state + serviceStart(rval); + } } config_parameter_free(params);