소스 검색

AppPriority is an optional parameter.

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.
Iain Patterson 10 년 전
부모
커밋
b47ff49386
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      registry.cpp

+ 1 - 1
registry.cpp

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