- if (ext != NULL) { /* OpenLDAP extended operation */
-#endif /* defined(LDAP_SLAPI) */
-
- rc = (ext->ext_main)( conn, op,
- reqoid.bv_val, reqdata.bv_val ? &reqdata : NULL,
- &rspoid, &rspdata, &rspctrls, &text, &refs );
-
- if( rc != SLAPD_ABANDON ) {
- if ( rc == LDAP_REFERRAL && refs == NULL ) {
- refs = referral_rewrite( default_referral,
- NULL, NULL, LDAP_SCOPE_DEFAULT );
- }
-
- send_ldap_extended( conn, op, rc, NULL, text, refs,
- rspoid, rspdata, rspctrls );
-
- ber_bvarray_free( refs );
- }
-
- if ( rspoid != NULL ) {
- free( rspoid );
- }
-
- if ( rspdata != NULL ) {
- ber_bvfree( rspdata );
- }
-
-#if defined( LDAP_SLAPI )
- goto done; /* end of OpenLDAP extended operation */
-
- } else { /* start of Netscape extended operation */
- rc = slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_OID,
- (void *)reqoid.bv_val);
- if ( rc != LDAP_SUCCESS ) {
- rc = LDAP_OTHER;
+ if ( funcAddr != NULL ) {
+ rs->sr_err = slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_OID,
+ (void *)op->ore_reqoid.bv_val);
+ if ( rs->sr_err != LDAP_SUCCESS ) {
+ rs->sr_err = LDAP_OTHER;