mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
ITS#4992 fix cldap
This commit is contained in:
parent
8cafa0b117
commit
469a45a62f
3 changed files with 19 additions and 4 deletions
|
|
@ -224,8 +224,9 @@ start_again:;
|
|||
i = ++(ld)->ld_msgid;
|
||||
#ifdef LDAP_CONNECTIONLESS
|
||||
if ( LDAP_IS_UDP(ld) ) {
|
||||
err = ber_write( ber, ld->ld_options.ldo_peer,
|
||||
sizeof(struct sockaddr), 0);
|
||||
struct sockaddr sa = {0};
|
||||
/* dummy, filled with ldo_peer in request.c */
|
||||
err = ber_write( ber, &sa, sizeof(sa), 0 );
|
||||
}
|
||||
if ( LDAP_IS_UDP(ld) && ld->ld_options.ldo_version ==
|
||||
LDAP_VERSION2 )
|
||||
|
|
|
|||
|
|
@ -255,6 +255,19 @@ ldap_send_server_request(
|
|||
|
||||
use_connection( ld, lc );
|
||||
|
||||
#ifdef LDAP_CONNECTIONLESS
|
||||
if ( LDAP_IS_UDP( ld )) {
|
||||
BerElement tmpber = *ber;
|
||||
ber_rewind( &tmpber );
|
||||
rc = ber_write( &tmpber, ld->ld_options.ldo_peer,
|
||||
sizeof( struct sockaddr ), 0 );
|
||||
if ( rc == -1 ) {
|
||||
ld->ld_errno = LDAP_ENCODING_ERROR;
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If we still have an incomplete write, try to finish it before
|
||||
* dealing with the new request. If we don't finish here, return
|
||||
* LDAP_BUSY and let the caller retry later. We only allow a single
|
||||
|
|
|
|||
|
|
@ -259,8 +259,9 @@ ldap_build_search_req(
|
|||
LDAP_NEXT_MSGID( ld, *idp );
|
||||
#ifdef LDAP_CONNECTIONLESS
|
||||
if ( LDAP_IS_UDP(ld) ) {
|
||||
err = ber_write( ber, ld->ld_options.ldo_peer,
|
||||
sizeof(struct sockaddr), 0);
|
||||
struct sockaddr sa = {0};
|
||||
/* dummy, filled with ldo_peer in request.c */
|
||||
err = ber_write( ber, &sa, sizeof( sa ), 0 );
|
||||
}
|
||||
if ( LDAP_IS_UDP(ld) && ld->ld_options.ldo_version == LDAP_VERSION2) {
|
||||
char *dn = ld->ld_options.ldo_cldapdn;
|
||||
|
|
|
|||
Loading…
Reference in a new issue