2 * Copyright 1999, John C. Quillan, All rights reserved.
4 * Redistribution and use in source and binary forms are permitted only
5 * as authorized by the OpenLDAP Public License. A copy of this
6 * license is available at http://www.OpenLDAP.org/license.html or
7 * in file LICENSE in the top-level directory of the distribution.
13 /* #include <ac/types.h>
14 #include <ac/socket.h>
21 #include "perl_back.h"
37 char *matched = NULL, *info = NULL;
39 PerlBackend *perl_back = (PerlBackend *)be->be_private;
41 ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );
47 XPUSHs( perl_back->pb_obj_ref );
49 for (; modlist != NULL; modlist = modlist->ml_next ) {
50 LDAPMod *mods = &modlist->ml_mod;
52 switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) {
54 XPUSHs(sv_2mortal(newSVpv("ADD", 0 )));
58 XPUSHs(sv_2mortal(newSVpv("DELETE", 0 )));
61 case LDAP_MOD_REPLACE:
62 XPUSHs(sv_2mortal(newSVpv("REPLACE", 0 )));
67 XPUSHs(sv_2mortal(newSVpv( mods->mod_type, 0 )));
70 mods->mod_bvalues != NULL && mods->mod_bvalues[i] != NULL;
73 XPUSHs(sv_2mortal(newSVpv( mods->mod_bvalues[i]->bv_val, 0 )));
79 count = perl_call_method("modify", G_SCALAR);
84 croak("Big trouble in back_search\n");
89 PUTBACK; FREETMPS; LEAVE;
92 ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
94 if( return_code != 0 ) {
95 send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" );
98 send_ldap_result( conn, op, LDAP_SUCCESS, "", "" );
101 Debug( LDAP_DEBUG_ANY, "Perl MODIFY\n", 0, 0, 0 );