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 );
48 XPUSHs(sv_2mortal(newSVpv( dn , 0)));
50 for (; modlist != NULL; modlist = modlist->ml_next ) {
51 LDAPMod *mods = &modlist->ml_mod;
53 switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) {
55 XPUSHs(sv_2mortal(newSVpv("ADD", 0 )));
59 XPUSHs(sv_2mortal(newSVpv("DELETE", 0 )));
62 case LDAP_MOD_REPLACE:
63 XPUSHs(sv_2mortal(newSVpv("REPLACE", 0 )));
68 XPUSHs(sv_2mortal(newSVpv( mods->mod_type, 0 )));
71 mods->mod_bvalues != NULL && mods->mod_bvalues[i] != NULL;
74 XPUSHs(sv_2mortal(newSVpv( mods->mod_bvalues[i]->bv_val, 0 )));
80 count = perl_call_method("modify", G_SCALAR);
85 croak("Big trouble in back_search\n");
90 PUTBACK; FREETMPS; LEAVE;
93 ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
95 if( return_code != 0 ) {
96 send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" );
99 send_ldap_result( conn, op, LDAP_SUCCESS, "", "" );
102 Debug( LDAP_DEBUG_ANY, "Perl MODIFY\n", 0, 0, 0 );