From: Howard Chu Date: Fri, 14 May 2004 08:03:25 +0000 (+0000) Subject: Fix ITS#3139, empty output buffer when sb_sasl_write fails X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~372 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9da35acf4421a0d57b7b8be1c67e4e8a7021049d;p=openldap Fix ITS#3139, empty output buffer when sb_sasl_write fails --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index cb4a25c94b..2b632482a8 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -374,8 +374,11 @@ sb_sasl_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) p->buf_out.buf_end = p->buf_out.buf_size; ret = ber_pvt_sb_do_write( sbiod, &p->buf_out ); - if ( ret <= 0 ) + if ( ret <= 0 ) { + /* caller will retry, so clear this buffer out */ + p->buf_out.buf_ptr = p->buf_out.buf_end; return ret; + } return len; }