AppPriority is an optional parameter.
authorIain Patterson <me@iain.cx>
Tue, 7 Jan 2014 10:09:20 +0000 (10:09 +0000)
committerIain Patterson <me@iain.cx>
Wed, 8 Jan 2014 12:38:34 +0000 (12:38 +0000)
We were incorrectly requiring its presence and logging an error when it
wasn't found.  The parameter was not intended to be mandatory and no
error should be logged unless the parameter is present but invalid.

registry.cpp

index c93d3ae..6576753 100644 (file)
@@ -496,7 +496,7 @@ int get_parameters(nssm_service_t *service, STARTUPINFO *si) {
 \r
   /* Try to get priority - may fail. */\r
   unsigned long priority;\r
-  if (get_number(key, NSSM_REG_PRIORITY, &priority) == 1) {\r
+  if (get_number(key, NSSM_REG_PRIORITY, &priority, false) == 1) {\r
     if (priority == (priority & priority_mask())) service->priority = priority;\r
     else log_event(EVENTLOG_WARNING_TYPE, NSSM_EVENT_BOGUS_PRIORITY, service->name, NSSM_REG_PRIORITY, 0);\r
   }\r