+ if ( numericoidValidate( NULL, (struct berval *)ext_oid ) !=
+ LDAP_SUCCESS )
+ {
+ oidm.bv_val = oidm_find( ext_oid->bv_val );
+ if ( oidm.bv_val == NULL ) {
+ return -1;
+ }
+ oidm.bv_len = strlen( oidm.bv_val );
+ ext_oid = &oidm;
+ }
+
+ for ( ext = supp_ext_list; ext; ext = ext->next ) {
+ if ( bvmatch( ext_oid, &ext->oid ) ) {
+ if ( flags == 1 ) {
+ break;
+ }
+ return -1;
+ }
+ }
+
+ if ( flags == 0 || ext == NULL ) {
+ ext = ch_calloc( 1, sizeof(struct extop_list) + ext_oid->bv_len + 1 );
+ if ( ext == NULL ) {
+ return(-1);
+ }
+
+ ext->oid.bv_val = (char *)(ext + 1);
+ AC_MEMCPY( ext->oid.bv_val, ext_oid->bv_val, ext_oid->bv_len );
+ ext->oid.bv_len = ext_oid->bv_len;
+ ext->oid.bv_val[ext->oid.bv_len] = '\0';