]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-perl/modify.c
happy belated New Year
[openldap] / servers / slapd / back-perl / modify.c
index 2776277e51f5c4f8404bba01030b7c580d27a9c8..c2062ad0480aa81ff06c3c22c0e82b79607996e0 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2005 The OpenLDAP Foundation.
+ * Copyright 1999-2010 The OpenLDAP Foundation.
  * Portions Copyright 1999 John C. Quillan.
  * Portions Copyright 2002 myinternet Limited.
  * All rights reserved.
@@ -27,6 +27,9 @@ perl_back_modify(
        int count;
        int i;
 
+#if defined(HAVE_WIN32_ASPERL) || defined(USE_ITHREADS)
+       PERL_SET_CONTEXT( PERL_INTERPRETER );
+#endif
 
        ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );  
 
@@ -63,6 +66,11 @@ perl_back_modify(
                        {
                                XPUSHs(sv_2mortal(newSVpv( mods->sm_values[i].bv_val, 0 )));
                        }
+
+                       /* Fix delete attrib without value. */
+                       if ( i == 0) {
+                               XPUSHs(sv_newmortal());
+                       }
                }
 
                PUTBACK;