]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8968 - Fix ASYNC connection on Solaris 10
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 31 Jan 2019 02:37:07 +0000 (02:37 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 31 Jan 2019 23:43:35 +0000 (23:43 +0000)
Fixes ASYNC connections to handle a return code of ENOTCONN as this is
what Solaris 10 does.

libraries/libldap/request.c

index 356c9bcf799518d6a4dba0b31f67d10b8fcebe4a..3849d996b265854b4617fec9b9faca5a9953e8ad 100644 (file)
@@ -184,7 +184,8 @@ ldap_int_flush_request(
 
        LDAP_ASSERT_MUTEX_OWNER( &ld->ld_conn_mutex );
        if ( ber_flush2( lc->lconn_sb, lr->lr_ber, LBER_FLUSH_FREE_NEVER ) != 0 ) {
-               if ( sock_errno() == EAGAIN ) {
+               if (( sock_errno() == EAGAIN ) || ( sock_errno() == ENOTCONN )) {
+                       /* ENOTCONN is returned in Solaris 10 */
                        /* need to continue write later */
                        lr->lr_status = LDAP_REQST_WRITING;
                        ldap_mark_select_write( ld, lc->lconn_sb );