commit eda90728ea3545fad900a091c58e7d7865d54594
Author: Dave Mielke <Dave@Mielke.cc>
Date:   Wed Nov 4 15:44:12 2020 -0500

    The parameter updated report listener should be called even when the API isn't running. (dm)

diff --git a/Programs/api_control.c b/Programs/api_control.c
index 71b3d0614..944eac21f 100644
--- a/Programs/api_control.c
+++ b/Programs/api_control.c
@@ -21,6 +21,7 @@
 #include "log.h"
 #include "api_control.h"
 #include "api_server.h"
+#include "report.h"
 #include "core.h"
 
 #ifndef ENABLE_API
@@ -201,7 +202,11 @@ apiFlushOutput (void) {
 
 static void
 apiUpdateParameter (brlapi_param_t parameter, brlapi_param_subparam_t subparam) {
-  if (isRunning) api_updateParameter(parameter, subparam);
+  if (isRunning) {
+    api_updateParameter(parameter, subparam);
+  } else {
+    reportParameterUpdated(parameter, subparam);
+  }
 }
 
 const ApiMethods api = {
diff --git a/Programs/brlapi_server.c b/Programs/brlapi_server.c
index 4055280ec..103eb3b45 100644
--- a/Programs/brlapi_server.c
+++ b/Programs/brlapi_server.c
@@ -2348,14 +2348,7 @@ void api_updateParameter(brlapi_param_t parameter, brlapi_param_subparam_t subpa
         }
         unlockMutex(&apiParamMutex);
 
-        {
-          const ApiParameterUpdatedReport data = {
-            .parameter = parameter,
-            .subparam = subparam
-          };
-
-          report(REPORT_API_PARAMETER_UPDATED, &data);
-        }
+        reportParameterUpdated(parameter, subparam);
       } else {
         logMessage(LOG_CATEGORY(SERVER_EVENTS), "parameter %u is not readable", parameter);
       }
diff --git a/Programs/report.c b/Programs/report.c
index a9743278d..4df0dde80 100644
--- a/Programs/report.c
+++ b/Programs/report.c
@@ -131,6 +131,16 @@ report (ReportIdentifier identifier, const void *data) {
   }
 }
 
+void
+reportParameterUpdated (brlapi_param_t parameter, brlapi_param_subparam_t subparam) {
+  const ApiParameterUpdatedReport data = {
+    .parameter = parameter,
+    .subparam = subparam
+  };
+
+  report(REPORT_API_PARAMETER_UPDATED, &data);
+}
+
 static int
 testListener (void *item, void *data) {
   ReportListenerInstance *rli = item;
diff --git a/Programs/report.h b/Programs/report.h
index d8fd893f5..d208f93f6 100644
--- a/Programs/report.h
+++ b/Programs/report.h
@@ -36,6 +36,10 @@ typedef enum {
 
 extern void report (ReportIdentifier identiier, const void *data);
 
+extern void reportParameterUpdated (
+  brlapi_param_t parameter, brlapi_param_subparam_t subparam
+);
+
 typedef struct {
   ReportIdentifier reportIdentifier;
   const void *reportData;
