On Wed, Jul 16, 2014 at 10:15 PM, <[email protected]> wrote:
> Author: wrowe
> Date: Wed Jul 16 20:15:49 2014
> New Revision: 1611169
>
> URL: http://svn.apache.org/r1611169
> Log:
> mpm_winnt: Accept utf-8 (Unicode) service names and descriptions for
> internationalization.
>
> Modified:
> httpd/httpd/trunk/CHANGES
> httpd/httpd/trunk/server/mpm/winnt/service.c
>
> Modified: httpd/httpd/trunk/CHANGES
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1611169&r1=1611168&r2=1611169&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/mpm/winnt/service.c (original)
> +++ httpd/httpd/trunk/server/mpm/winnt/service.c Wed Jul 16 20:15:49 2014
[...]
> @@ -354,21 +445,99 @@ static void __stdcall service_nt_main_fn
[...]
> + static DWORD WINAPI service_nt_dispatch_thread(LPVOID nada)
> + {
> +#if APR_HAS_UNICODE_FS
> + SERVICE_TABLE_ENTRYW dispatchTable_w[] =
> + {
> + { L"", service_nt_main_fn_w },
> { NULL, NULL }
> };
> -
> - /* ###: utf-ize */
> - if (!StartServiceCtrlDispatcher(dispatchTable))
> +#endif /* APR_HAS_UNICODE_FS */
> +#if APR_HAS_ANSI_FS
> + SERVICE_TABLE_ENTRYA dispatchTable[] =
> {
> + { "", service_nt_main_fn },
> + { NULL, NULL }
> + };
> +#endif
> + apr_status_t rv;
> +
> +#if APR_HAS_UNICODE_FS
> + IF_WIN_OS_IS_UNICODE
> + rv = StartServiceCtrlDispatcherW(dispatchTable_w);
> +#endif
> +#if APR_HAS_ANSI_FS
> + ELSE_WIN_OS_IS_ANSI
> + rv = StartServiceCtrlDispatcherA(dispatchTable);
> +#endif
> + if (rv) {
> + apr_status_t rv = APR_SUCCESS;
> + }
Shouldn't apr_status_t be removed here (and maybe rv initialized to
APR_SUCCESS above)?
> + else {
> /* This is a genuine failure of the SCM. */
> rv = apr_get_os_error();
> ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
Regards,
Yann.