3 * Copyright 1999, John C. Quillan, All rights reserved.
5 * Redistribution and use in source and binary forms are permitted only
6 * as authorized by the OpenLDAP Public License. A copy of this
7 * license is available at http://www.OpenLDAP.org/license.html or
8 * in file LICENSE in the top-level directory of the distribution.
14 /* #include <ac/types.h>
15 #include <ac/socket.h>
22 #include "perl_back.h"
38 char *matched = NULL, *info = NULL;
40 PerlBackend *perl_back = (PerlBackend *)be->be_private;
42 ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );
48 XPUSHs( perl_back->pb_obj_ref );
49 XPUSHs(sv_2mortal(newSVpv( dn , 0)));
51 for (; modlist != NULL; modlist = modlist->ml_next ) {
52 LDAPMod *mods = &modlist->ml_mod;
54 switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) {
56 XPUSHs(sv_2mortal(newSVpv("ADD", 0 )));
60 XPUSHs(sv_2mortal(newSVpv("DELETE", 0 )));
63 case LDAP_MOD_REPLACE:
64 XPUSHs(sv_2mortal(newSVpv("REPLACE", 0 )));
69 XPUSHs(sv_2mortal(newSVpv( mods->mod_type, 0 )));
72 mods->mod_bvalues != NULL && mods->mod_bvalues[i] != NULL;
75 XPUSHs(sv_2mortal(newSVpv( mods->mod_bvalues[i]->bv_val, 0 )));
81 count = perl_call_method("modify", G_SCALAR);
86 croak("Big trouble in back_search\n");
91 PUTBACK; FREETMPS; LEAVE;
94 ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
96 if( return_code != 0 ) {
97 send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
98 NULL, NULL, NULL, NULL );
101 send_ldap_result( conn, op, LDAP_SUCCESS,
102 NULL, NULL, NULL, NULL );
105 Debug( LDAP_DEBUG_ANY, "Perl MODIFY\n", 0, 0, 0 );