Fix unused-variable warning on Windows.
Introduced in 585bca39: msgid is not used in the Windows code path. Also adjust comments a tad (mostly to keep pgindent from messing it up). David Rowley
This commit is contained in:
parent
9fe55259fd
commit
0156315823
@ -3362,11 +3362,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
|
|||||||
int port = LDAP_DEF_PORT,
|
int port = LDAP_DEF_PORT,
|
||||||
scope,
|
scope,
|
||||||
rc,
|
rc,
|
||||||
msgid,
|
|
||||||
size,
|
size,
|
||||||
state,
|
state,
|
||||||
oldstate,
|
oldstate,
|
||||||
i;
|
i;
|
||||||
|
#ifndef WIN32
|
||||||
|
int msgid;
|
||||||
|
#endif
|
||||||
bool found_keyword;
|
bool found_keyword;
|
||||||
char *url,
|
char *url,
|
||||||
*hostname,
|
*hostname,
|
||||||
@ -3511,11 +3513,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform an explicit anonymous bind.
|
* Perform an explicit anonymous bind.
|
||||||
* LDAP does not require that an anonymous bind is preformed explicitly,
|
*
|
||||||
|
* LDAP does not require that an anonymous bind is performed explicitly,
|
||||||
* but we want to distinguish between the case where LDAP bind does not
|
* but we want to distinguish between the case where LDAP bind does not
|
||||||
* succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
|
* succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
|
||||||
* the service control file) and the case where querying the LDAP server
|
* the service control file) and the case where querying the LDAP server
|
||||||
* fails (return 1 to end parsing).
|
* fails (return 1 to end parsing).
|
||||||
|
*
|
||||||
* Unfortunately there is no way of setting a timeout that works for
|
* Unfortunately there is no way of setting a timeout that works for
|
||||||
* both Windows and OpenLDAP.
|
* both Windows and OpenLDAP.
|
||||||
*/
|
*/
|
||||||
@ -3528,7 +3532,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
|
|||||||
ldap_unbind(ld);
|
ldap_unbind(ld);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
#else /* WIN32 */
|
#else /* !WIN32 */
|
||||||
/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
|
/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
|
||||||
if (ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &time) != LDAP_SUCCESS)
|
if (ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &time) != LDAP_SUCCESS)
|
||||||
{
|
{
|
||||||
@ -3783,7 +3787,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif /* USE_LDAP */
|
||||||
|
|
||||||
#define MAXBUFSIZE 256
|
#define MAXBUFSIZE 256
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user