]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-perl/compare.c
Add a safety check to bvcasechr
[openldap] / servers / slapd / back-perl / compare.c
index 9ade62f55d43c3ab407fd1cbc0982a5906e5f68c..82d445ba0d076df5e556aa6baf9594c6b2d9cb67 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  *      Copyright 1999, John C. Quillan, All rights reserved.
  *
@@ -30,7 +31,8 @@ perl_back_compare(
        Backend *be,
        Connection      *conn,
        Operation       *op,
-       char    *dn,
+       const char      *dn,
+       const char      *ndn,
        Ava             *ava
 )
 {
@@ -39,17 +41,17 @@ perl_back_compare(
 
        PerlBackend *perl_back = (PerlBackend *)be->be_private;
 
-       send_ldap_result( conn, op, LDAP_NOT_SUPPORTED,
-               "", "not yet implemented" );
+       send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
+               NULL, "not supported", NULL, NULL );
 
 #ifdef notdef
-       pthread_mutex_lock( &perl_interpreter_mutex );  
+       ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );  
 
        {
                dSP; ENTER; SAVETMPS;
 
                PUSHMARK(sp);
-               XPUSHs( perl_back->obj_ref );
+               XPUSHs( perl_back->pb_obj_ref );
                XPUSHs(sv_2mortal(newSVpv( dn , 0)));
                /* XPUSHs(sv_2mortal(newSVpv( cred->bv_val , cred->bv_len))); */
                PUTBACK;
@@ -67,13 +69,13 @@ perl_back_compare(
                PUTBACK; FREETMPS; LEAVE;
        }
 
-       pthread_mutex_unlock( &perl_interpreter_mutex );        
+       ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );        
 
        if( return_code != 0 ) {
-               send_ldap_result( conn, op, LDAP_COMPARE_TRUE, "", "" );
+               send_ldap_result( conn, op, LDAP_COMPARE_TRUE, NULL, NULL );
 
        } else {
-               send_ldap_result( conn, op, LDAP_COMPARE_FALSE, "", "" );
+               send_ldap_result( conn, op, LDAP_COMPARE_FALSE, NULL, NULL );
        }
 #endif