mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-06 15:00:40 +08:00
fix last commit
This commit is contained in:
parent
a593343aa5
commit
1ded030427
@ -362,13 +362,18 @@ sb_sasl_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
|
||||
#else
|
||||
ber_pvt_sb_buf_destroy( &p->buf_out );
|
||||
#endif
|
||||
if ( len > *p->sasl_maxbuf - 100 )
|
||||
unsigned tmpsize = p->buf_out.buf_size;
|
||||
if ( len > *p->sasl_maxbuf - 100 ) {
|
||||
len = *p->sasl_maxbuf - 100; /* For safety margin */
|
||||
}
|
||||
|
||||
{
|
||||
unsigned tmpsize = p->buf_out.buf_size;
|
||||
ret = sasl_encode( p->sasl_context, buf, len,
|
||||
(SASL_CONST char **)&p->buf_out.buf_base,
|
||||
&tmpsize );
|
||||
p->buf_out.buf_size = tmpsize;
|
||||
}
|
||||
|
||||
if ( ret != SASL_OK ) {
|
||||
ber_log_printf( LDAP_DEBUG_ANY, sbiod->sbiod_sb->sb_debug,
|
||||
"sb_sasl_write: failed to encode packet: %s\n",
|
||||
|
@ -38,7 +38,7 @@ int ldap_grouping_create(
|
||||
{
|
||||
int rc;
|
||||
BerElement *ber = NULL;
|
||||
struct berval bv = {0, NULL};
|
||||
struct berval bv = BER_BVNULL;
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG ( OPERATION, ENTRY, "ldap_grouping_create\n", 0,0,0 );
|
||||
@ -65,7 +65,6 @@ int ldap_grouping_create(
|
||||
}
|
||||
|
||||
rc = ber_flatten2( ber, &bv, 0 );
|
||||
|
||||
if( rc < 0 ) {
|
||||
ld->ld_errno = LDAP_ENCODING_ERROR;
|
||||
return( ld->ld_errno );
|
||||
|
Loading…
x
Reference in New Issue
Block a user