commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DAEMON-155) BOOL docmdRunService(LPAPXCMDLINE lpCmdline) has strange check for StartServiceCtrlDispatcherW return
Date Wed, 24 Mar 2010 00:38:27 GMT

     [ https://issues.apache.org/jira/browse/DAEMON-155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved DAEMON-155.
-------------------------

    Resolution: Fixed

URL: http://svn.apache.org/viewvc?rev=926881&view=rev
Log:
DAEMON-155 BOOL docmdRunService(LPAPXCMDLINE lpCmdline) has strange check for StartServiceCtrlDispatcherW
return

Modified:
   commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c

> BOOL docmdRunService(LPAPXCMDLINE lpCmdline) has strange check for StartServiceCtrlDispatcherW
return
> -----------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-155
>                 URL: https://issues.apache.org/jira/browse/DAEMON-155
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>            Reporter: Sebb
>            Priority: Minor
>
> docmdRunService calls docmdRunService as follows:
> {code}
> rv = (StartServiceCtrlDispatcherW(_service_table) == FALSE);
> {code}
> However, the documentation for StartServiceCtrlDispatcherW states that it returns 0 (i.e.
FALSE here) only if it fails.
> Thus rv is set FALSE iff the call fails. That's surely the wrong way round? It would
explain why the log says 
> "[error] Commons Daemon procrun failed with exit value: 4"
> I think the code should read
> {code}
> rv = (StartServiceCtrlDispatcherW(_service_table) != 0);
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message