-#if defined( LDAP_SLAPI )
- goto done; /* end of OpenLDAP extended operation */
-
- } else { /* start of Netscape extended operation */
- if ( ( rc = slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_OID,(void *)reqoid.bv_val) ) == 0 &&
- ( rc = slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_VALUE,(void *)&reqdata) ) == 0 &&
- ( rc = slapi_pblock_set( pb, SLAPI_CONNECTION,(void *)conn) ) == 0 &&
- ( rc = slapi_pblock_set( pb, SLAPI_OPERATION, (void *)op) ) == 0) {
- extop_rc = (*funcAddr)( pb );
- if ( extop_rc == SLAPI_PLUGIN_EXTENDED_SENT_RESULT ) {
- msg_sent = TRUE;
- } else if ( extop_rc == SLAPI_PLUGIN_EXTENDED_NOT_HANDLED ) {
- rc = LDAP_PROTOCOL_ERROR;
- result_msg = UNSUPPORTED_EXTENDEDOP;
- } else {
- if ( ( rc = slapi_pblock_get(pb, SLAPI_EXT_OP_RET_OID,&rspoid) ) == 0 &&
- ( rc = slapi_pblock_get(pb, SLAPI_EXT_OP_RET_VALUE,&rspdata) ) == 0 ) {
- send_ldap_extended( conn, op, extop_rc, NULL, text, refs,
- rspoid, rspdata, rspctrls );
- msg_sent = TRUE;
- } else {
- rc = LDAP_OPERATIONS_ERROR;
- }
- }
- } else {
- rc = LDAP_OPERATIONS_ERROR;
- }
+done:;
+ return rs->sr_err;
+}
+
+int
+load_extop2(
+ const struct berval *ext_oid,
+ slap_mask_t ext_flags,
+ SLAP_EXTOP_MAIN_FN *ext_main,
+ unsigned flags )
+{
+ struct berval oidm = BER_BVNULL;
+ struct extop_list *ext;
+ int insertme = 0;