mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-03 20:40:05 -05:00
Fix ITS#1983, in sb_sasl_write, set errno = EAGAIN to tell upper layers to
retry partial writes
This commit is contained in:
parent
536019beb4
commit
010dbff2cc
1 changed files with 6 additions and 1 deletions
|
|
@ -331,8 +331,13 @@ sb_sasl_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
|
|||
/* Are there anything left in the buffer? */
|
||||
if ( p->buf_out.buf_ptr != p->buf_out.buf_end ) {
|
||||
ret = ber_pvt_sb_do_write( sbiod, &p->buf_out );
|
||||
if ( ret <= 0 )
|
||||
if ( ret < 0 )
|
||||
return ret;
|
||||
/* Still have something left?? */
|
||||
if ( p->buf_out.buf_ptr != p->buf_out.buf_end ) {
|
||||
errno = EAGAIN;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* now encode the next packet. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue