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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@apache.org
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.

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@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.

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@apache.org
In reply to this post by JIRA jira@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.