You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2010/03/23 01:11:27 UTC

[jira] Created: (DAEMON-155) BOOL docmdRunService(LPAPXCMDLINE lpCmdline) has strange check for StartServiceCtrlDispatcherW return

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.


[jira] Resolved: (DAEMON-155) BOOL docmdRunService(LPAPXCMDLINE lpCmdline) has strange check for StartServiceCtrlDispatcherW return

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (DAEMON-155) BOOL docmdRunService(LPAPXCMDLINE lpCmdline) has strange check for StartServiceCtrlDispatcherW return

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated DAEMON-155:
------------------------

    Fix Version/s: 1.0.3

> 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
>             Fix For: 1.0.3
>
>
> 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.