Commit f93e53c9 authored by Alexandre Julliard's avatar Alexandre Julliard

ldap: Import upstream release 2.5.14.

parent f953b99c
......@@ -63,7 +63,7 @@
#ifdef HAVE_WINSOCK2
#include <winsock2.h>
#include <ws2tcpip.h>
#elif HAVE_WINSOCK
#elif defined(HAVE_WINSOCK)
#include <winsock.h>
#endif
......@@ -114,22 +114,20 @@
LBER_F( char * ) ber_pvt_wsa_err2string LDAP_P((int));
#elif MACOS
#elif defined(MACOS)
# define tcp_close( s ) tcpclose( s )
# define tcp_read( s, buf, len ) tcpread( s, buf, len )
# define tcp_write( s, buf, len ) tcpwrite( s, buf, len )
#elif DOS
# ifdef PCNFS
# define tcp_close( s ) close( s )
# define tcp_read( s, buf, len ) recv( s, buf, len, 0 )
# define tcp_write( s, buf, len ) send( s, buf, len, 0 )
# endif /* PCNFS */
# ifdef NCSA
# define tcp_close( s ) do { netclose( s ); netshut() } while(0)
# define tcp_read( s, buf, len ) nread( s, buf, len )
# define tcp_write( s, buf, len ) netwrite( s, buf, len )
# endif /* NCSA */
#elif defined(HAVE_PCNFS)
# define tcp_close( s ) close( s )
# define tcp_read( s, buf, len ) recv( s, buf, len, 0 )
# define tcp_write( s, buf, len ) send( s, buf, len, 0 )
#elif defined(HAVE_NCSA)
# define tcp_close( s ) do { netclose( s ); netshut() } while(0)
# define tcp_read( s, buf, len ) nread( s, buf, len )
# define tcp_write( s, buf, len ) netwrite( s, buf, len )
#elif defined(HAVE_CLOSESOCKET)
# define tcp_close( s ) closesocket( s )
......
......@@ -253,7 +253,8 @@ typedef enum {
LDAP_PVT_THREAD_POOL_PARAM_ACTIVE_MAX,
LDAP_PVT_THREAD_POOL_PARAM_PENDING_MAX,
LDAP_PVT_THREAD_POOL_PARAM_BACKLOAD_MAX,
LDAP_PVT_THREAD_POOL_PARAM_STATE
LDAP_PVT_THREAD_POOL_PARAM_STATE,
LDAP_PVT_THREAD_POOL_PARAM_PAUSED
} ldap_pvt_thread_pool_param_t;
#endif /* !LDAP_PVT_THREAD_H_DONE */
......
......@@ -266,9 +266,9 @@ ber_dump(
}
sprintf( buf, "ber_dump: buf=%p ptr=%p end=%p len=%ld\n",
ber->ber_buf,
ber->ber_ptr,
ber->ber_end,
(void *) ber->ber_buf,
(void *) ber->ber_ptr,
(void *) ber->ber_end,
(long) len );
(void) (*ber_pvt_log_print)( buf );
......
......@@ -555,6 +555,8 @@ put_simple_filter(
Debug1( LDAP_DEBUG_TRACE, "put_simple_filter: \"%s\"\n",
str );
if ( str[0] == '=' ) return -1;
str = LDAP_STRDUP( str );
if( str == NULL ) return -1;
......
......@@ -961,7 +961,7 @@ ldap_do_free_request( void *arg )
Debug3( LDAP_DEBUG_TRACE, "ldap_do_free_request: "
"asked to free lr %p msgid %d refcnt %d\n",
lr, lr->lr_msgid, lr->lr_refcnt );
(void *) lr, lr->lr_msgid, lr->lr_refcnt );
/* if lr_refcnt > 0, the request has been looked up
* by ldap_find_request_by_msgid(); if in the meanwhile
* the request is free()'d by someone else, just decrease
......@@ -1008,7 +1008,7 @@ ldap_free_request_int( LDAP *ld, LDAPRequest *lr )
assert( !removed || removed == lr );
Debug3( LDAP_DEBUG_TRACE, "ldap_free_request_int: "
"lr %p msgid %d%s removed\n",
lr, lr->lr_msgid, removed ? "" : " not" );
(void *) lr, lr->lr_msgid, removed ? "" : " not" );
ldap_do_free_request( lr );
}
......@@ -1673,12 +1673,12 @@ ldap_find_request_by_msgid( LDAP *ld, ber_int_t msgid )
lr->lr_refcnt++;
Debug3( LDAP_DEBUG_TRACE, "ldap_find_request_by_msgid: "
"msgid %d, lr %p lr->lr_refcnt = %d\n",
msgid, lr, lr->lr_refcnt );
msgid, (void *) lr, lr->lr_refcnt );
return lr;
}
Debug2( LDAP_DEBUG_TRACE, "ldap_find_request_by_msgid: "
"msgid %d, lr %p\n", msgid, lr );
"msgid %d, lr %p\n", msgid, (void *) lr );
return NULL;
}
......@@ -1690,7 +1690,7 @@ ldap_return_request( LDAP *ld, LDAPRequest *lrx, int freeit )
lr = ldap_tavl_find( ld->ld_requests, lrx, ldap_req_cmp );
Debug2( LDAP_DEBUG_TRACE, "ldap_return_request: "
"lrx %p, lr %p\n", lrx, lr );
"lrx %p, lr %p\n", (void *) lrx, (void *) lr );
if ( lr ) {
assert( lr == lrx );
if ( lr->lr_refcnt > 0 ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment