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"
39 char *matched = NULL, *info = NULL;
41 PerlBackend *perl_back = (PerlBackend *)be->be_private;
43 ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );
49 XPUSHs( perl_back->pb_obj_ref );
50 XPUSHs(sv_2mortal(newSVpv( dn , 0)));
52 for (; modlist != NULL; modlist = modlist->ml_next ) {
53 LDAPMod *mods = &modlist->ml_mod;
55 switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) {
57 XPUSHs(sv_2mortal(newSVpv("ADD", 0 )));
61 XPUSHs(sv_2mortal(newSVpv("DELETE", 0 )));
64 case LDAP_MOD_REPLACE:
65 XPUSHs(sv_2mortal(newSVpv("REPLACE", 0 )));
70 XPUSHs(sv_2mortal(newSVpv( mods->mod_type, 0 )));
73 mods->mod_bvalues != NULL && mods->mod_bvalues[i] != NULL;
76 XPUSHs(sv_2mortal(newSVpv( mods->mod_bvalues[i]->bv_val, 0 )));
82 count = perl_call_method("modify", G_SCALAR);
87 croak("Big trouble in back_search\n");
92 PUTBACK; FREETMPS; LEAVE;
95 ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );
97 if( return_code != 0 ) {
98 send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
99 NULL, NULL, NULL, NULL );
102 send_ldap_result( conn, op, LDAP_SUCCESS,
103 NULL, NULL, NULL, NULL );
106 Debug( LDAP_DEBUG_ANY, "Perl MODIFY\n", 0, 0, 0 );