From 5feeec67d79c5a0d134f2f7132042ce803952f4f Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 14 Dec 2010 15:06:32 +0000 Subject: [PATCH] ITS#6747 Fix LDAP_CONNECTIONLESS Debug(), warnings --- libraries/libldap/abandon.c | 2 +- libraries/libldap/search.c | 2 +- servers/slapd/connection.c | 4 ++++ servers/slapd/daemon.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index 55000407bc..1a6b64b22f 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -211,7 +211,7 @@ start_again:; if ( LDAP_IS_UDP(ld) ) { struct sockaddr sa = {0}; /* dummy, filled with ldo_peer in request.c */ - err = ber_write( ber, &sa, sizeof(sa), 0 ); + err = ber_write( ber, (char *) &sa, sizeof(sa), 0 ); } if ( LDAP_IS_UDP(ld) && ld->ld_options.ldo_version == LDAP_VERSION2 ) diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index d74a6109a3..65d55e4774 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -302,7 +302,7 @@ ldap_build_search_req( if ( LDAP_IS_UDP(ld) ) { struct sockaddr sa = {0}; /* dummy, filled with ldo_peer in request.c */ - err = ber_write( ber, &sa, sizeof( sa ), 0 ); + err = ber_write( ber, (char *) &sa, sizeof( sa ), 0 ); } if ( LDAP_IS_UDP(ld) && ld->ld_options.ldo_version == LDAP_VERSION2) { char *dn = ld->ld_options.ldo_cldapdn; diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index c99f365624..83bed4e949 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -39,6 +39,10 @@ #include "lutil.h" #include "slap.h" +#ifdef LDAP_CONNECTIONLESS +#include "../../libraries/liblber/lber-int.h" /* ber_int_sb_read() */ +#endif + #ifdef LDAP_SLAPI #include "slapi/slapi.h" #endif diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 6abc52866b..459bb8d3bf 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -2867,7 +2867,7 @@ connectionless_init( void ) if ( !c ) { Debug( LDAP_DEBUG_TRACE, "connectionless_init: failed on %s (%d)\n", - lr->sl_url, lr->sl_sd, 0 ); + lr->sl_url.bv_val, lr->sl_sd, 0 ); return -1; } lr->sl_is_udp++; -- 2.39.5