You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Colm MacCarthaigh <co...@stdlib.net> on 2005/01/20 12:53:36 UTC

[PATCH] LDAP option_set_tls should return a value

This isn't win32 specific, which is why it isn't in the other patch,
but it's a trivial fix. option_set_tls never actually returns anything.

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Re: [PATCH] LDAP option_set_tls should return a value

Posted by Graham Leggett <mi...@sharp.fm>.
Colm MacCarthaigh said:

> No, but the function is typed int, and it doesn't return ever one :)
> Either return result->rc, like option_set_cert, or make the function
> void :) But you can't have it both ways.

Sorry I misunderstood you - I thought the functions were not returning
result codes, in other words "success" when it meant "fail". I've changed
the functions to void, no use returning the same code twice.

Regards,
Graham
--


Re: [PATCH] LDAP option_set_tls should return a value

Posted by Colm MacCarthaigh <co...@stdlib.net>.
On Thu, Jan 20, 2005 at 03:42:18PM +0200, Graham Leggett wrote:
> Colm MacCarthaigh said:
> 
> > This isn't win32 specific, which is why it isn't in the other patch,
> > but it's a trivial fix. option_set_tls never actually returns anything.
> 
> The return codes are passed back inside the result_err structure,
> apr_ldap_*_option() returns either APR_SUCCESS or APR_EGENERAL depending
> on whether the underlying LDAP call was successful or not.
> 
> Is there a specific case where this is not happening?

No, but the function is typed int, and it doesn't return ever one :)
Either return result->rc, like option_set_cert, or make the function
void :) But you can't have it both ways.

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Re: [PATCH] LDAP option_set_tls should return a value

Posted by Graham Leggett <mi...@sharp.fm>.
Colm MacCarthaigh said:

> This isn't win32 specific, which is why it isn't in the other patch,
> but it's a trivial fix. option_set_tls never actually returns anything.

The return codes are passed back inside the result_err structure,
apr_ldap_*_option() returns either APR_SUCCESS or APR_EGENERAL depending
on whether the underlying LDAP call was successful or not.

Is there a specific case where this is not happening?

Regards,
Graham
--