You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Bernd Eckenfels <ec...@zusammenkunft.net> on 2016/11/28 21:08:22 UTC

Re: svn commit: r1771815 - /commons/proper/daemon/trunk/src/native/windows/src/service.c

Hello Mark,

are we sure the removed TODO is not related with apxPoolAlloc() return
code?

(I also miss the inserted closing brace, does it still compile? Is that
a different commit?)

Gruss
Bernd


 Am Mon, 28 Nov 2016 21:04:06 -0000
schrieb markt@apache.org:

> Author: markt
> Date: Mon Nov 28 21:04:06 2016
> New Revision: 1771815
> 
> URL: http://svn.apache.org/viewvc?rev=1771815&view=rev
> Log:
> Fix regression in r1771804
> 
> Modified:
>     commons/proper/daemon/trunk/src/native/windows/src/service.c
> 
> Modified: commons/proper/daemon/trunk/src/native/windows/src/service.c
> URL:
> http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/service.c?rev=1771815&r1=1771814&r2=1771815&view=diff
> ==============================================================================
> --- commons/proper/daemon/trunk/src/native/windows/src/service.c
> (original) +++
> commons/proper/daemon/trunk/src/native/windows/src/service.c Mon Nov
> 28 21:04:06 2016 @@ -147,7 +147,7 @@ apxServiceOpen(APXHANDLE
> hService, LPCWS lpService->stServiceEntry.szObjectName[0] = L'\0'; }
> if (!QueryServiceConfigW(lpService->hService, NULL, 0, &dwNeeded)) {
> -        if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
> +        if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
>          	// This is expected. The call is expected to fail
> with the required // buffer size set in dwNeeded.
>          	// Clear the last error to prevent it being logged
> if a genuine @@ -157,7 +157,6 @@ apxServiceOpen(APXHANDLE hService,
> LPCWS apxLogWrite(APXLOG_MARK_SYSERR);
>          }
>      }
> -    /* TODO: Check GetLastError  ERROR_INSUFFICIENT_BUFFER */
>      lpService->stServiceEntry.lpConfig =
> (LPQUERY_SERVICE_CONFIGW)apxPoolAlloc(hService->hPool, dwNeeded);
>      return QueryServiceConfigW(lpService->hService,
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1771815 - /commons/proper/daemon/trunk/src/native/windows/src/service.c

Posted by Mark Thomas <ma...@apache.org>.
On 28/11/2016 21:08, Bernd Eckenfels wrote:
> Hello Mark,
> 
> are we sure the removed TODO is not related with apxPoolAlloc() return
> code?

Yes.

> (I also miss the inserted closing brace, does it still compile? Is that
> a different commit?)

See the commit log.

Mark


> 
> Gruss
> Bernd
> 
> 
>  Am Mon, 28 Nov 2016 21:04:06 -0000
> schrieb markt@apache.org:
> 
>> Author: markt
>> Date: Mon Nov 28 21:04:06 2016
>> New Revision: 1771815
>>
>> URL: http://svn.apache.org/viewvc?rev=1771815&view=rev
>> Log:
>> Fix regression in r1771804
>>
>> Modified:
>>     commons/proper/daemon/trunk/src/native/windows/src/service.c
>>
>> Modified: commons/proper/daemon/trunk/src/native/windows/src/service.c
>> URL:
>> http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/service.c?rev=1771815&r1=1771814&r2=1771815&view=diff
>> ==============================================================================
>> --- commons/proper/daemon/trunk/src/native/windows/src/service.c
>> (original) +++
>> commons/proper/daemon/trunk/src/native/windows/src/service.c Mon Nov
>> 28 21:04:06 2016 @@ -147,7 +147,7 @@ apxServiceOpen(APXHANDLE
>> hService, LPCWS lpService->stServiceEntry.szObjectName[0] = L'\0'; }
>> if (!QueryServiceConfigW(lpService->hService, NULL, 0, &dwNeeded)) {
>> -        if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
>> +        if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
>>          	// This is expected. The call is expected to fail
>> with the required // buffer size set in dwNeeded.
>>          	// Clear the last error to prevent it being logged
>> if a genuine @@ -157,7 +157,6 @@ apxServiceOpen(APXHANDLE hService,
>> LPCWS apxLogWrite(APXLOG_MARK_SYSERR);
>>          }
>>      }
>> -    /* TODO: Check GetLastError  ERROR_INSUFFICIENT_BUFFER */
>>      lpService->stServiceEntry.lpConfig =
>> (LPQUERY_SERVICE_CONFIGW)apxPoolAlloc(hService->hPool, dwNeeded);
>>      return QueryServiceConfigW(lpService->hService,
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org