-#ifdef NEW_LOGGING
- LDAP_LOG( OPERATION, DETAIL1,
- "do_extended: conn %d oid=%d\n.", conn->c_connid, reqoid.bv_val, 0 );
-#else
- Debug( LDAP_DEBUG_ARGS, "do_extended: oid=%s\n", reqoid.bv_val, 0 ,0 );
-#endif
-
- rspoid = NULL;
- rspdata = NULL;
- rspctrls = NULL;
- text = NULL;
- refs = NULL;
-
-#if defined(LDAP_SLAPI)
- 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 );
- }