]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapmodify.c
Fix last commit
[openldap] / clients / tools / ldapmodify.c
index 9157824466427ad08ff1d67324891f0adb01970d..25dfcdf2df5ee8bf577bb4af0d074d44697a6459 100644 (file)
@@ -1116,13 +1116,21 @@ static int process_response(
        LDAPMessage *res;
        int rc = LDAP_OTHER;
 
-       if( ldap_result( ld, msgid, txn ? 0 : 1, NULL, &res ) == -1 ) {
+       if( ldap_result( ld, msgid,
+#ifdef LDAP_GROUP_TRANSACTION
+               txn ? 0 : 1,
+#else
+               1,
+#endif
+               NULL, &res ) == -1 ) {
                ldap_get_option( ld, LDAP_OPT_ERROR_NUMBER, &rc );
                return rc;
        }
 
        if( ldap_msgtype( res ) != LDAP_RES_INTERMEDIATE ) {
-               return ldap_result2error( ld, res, 1 );
+               rc = ldap_result2error( ld, res, 1 );
+               if (rc) ldap_perror( ld, opstr );
+               return rc;
        }
 
 #ifdef LDAP_GROUP_TRANSACTION