]> git.sur5r.net Git - openldap/commitdiff
API updates, some typo fixes
authorHoward Chu <hyc@openldap.org>
Sat, 2 Feb 2002 10:10:35 +0000 (10:10 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 2 Feb 2002 10:10:35 +0000 (10:10 +0000)
servers/slapd/back-perl/add.c
servers/slapd/back-perl/bind.c
servers/slapd/back-perl/compare.c
servers/slapd/back-perl/config.c
servers/slapd/back-perl/delete.c
servers/slapd/back-perl/external.h
servers/slapd/back-perl/init.c
servers/slapd/back-perl/modify.c
servers/slapd/back-perl/modrdn.c
servers/slapd/back-perl/search.c

index 707b140f94e711a74e548a00a652d52edd0f40d0..83509188d668bd6df6adc1918f2aa73c5266a2a8 100644 (file)
@@ -52,7 +52,7 @@ perl_back_add(
                SPAGAIN;
 
                if (count != 1) {
-                       croak("Big trouble in back_search\n");
+                       croak("Big trouble in back_add\n");
                }
                                                         
                return_code = POPi;
@@ -72,6 +72,6 @@ perl_back_add(
                        NULL, NULL, NULL, NULL );
        }
 
-       Debug( LDAP_DEBUG_ANY, "Here ADD\n", 0, 0, 0 );
+       Debug( LDAP_DEBUG_ANY, "Perl ADD\n", 0, 0, 0 );
        return( 0 );
 }
index 4801400feaf4a6d5dad780537ed1a8c27020456e..fccc8e840a42d185c59d5fc5e9dc564f114f133d 100644 (file)
@@ -76,5 +76,3 @@ perl_back_bind(
 
        return ( return_code );
 }
-
-
index 82d445ba0d076df5e556aa6baf9594c6b2d9cb67..b490b197da805edec05260606278807ac7b1c6d2 100644 (file)
@@ -31,9 +31,9 @@ perl_back_compare(
        Backend *be,
        Connection      *conn,
        Operation       *op,
-       const char      *dn,
-       const char      *ndn,
-       Ava             *ava
+       struct berval   *dn,
+       struct berval   *ndn,
+       AttributeAssertion              *ava
 )
 {
        int return_code;
@@ -56,12 +56,12 @@ perl_back_compare(
                /* XPUSHs(sv_2mortal(newSVpv( cred->bv_val , cred->bv_len))); */
                PUTBACK;
 
-               count = perl_call_method("bind", G_SCALAR);
+               count = perl_call_method("compare", G_SCALAR);
 
                SPAGAIN;
 
                if (count != 1) {
-                       croak("Big trouble in back_search\n");
+                       croak("Big trouble in back_compare\n");
                }
 
                return_code = POPi;
@@ -79,7 +79,7 @@ perl_back_compare(
        }
 #endif
 
-       Debug( LDAP_DEBUG_ANY, "Here BIND\n", 0, 0, 0 );
+       Debug( LDAP_DEBUG_ANY, "Perl COMPARE\n", 0, 0, 0 );
 
        return (0);
 }
index f68a0a1282d380df62fe23a2b1c669c07a98aabd..fd3105aa7e7837c8c07c32a154d9599111a87e24 100644 (file)
@@ -125,7 +125,7 @@ perl_back_db_config(
                /* if the module rejected it then we should reject it */
                if ( return_code != 0 ) {
                        fprintf( stderr,
-                                "Unknown perl backeng config: %s\n", argv[0]);
+                                "Unknown perl backend config: %s\n", argv[0]);
                        exit( EXIT_FAILURE );
                }
        }
index 25870de2ae39727cf8c7706e5861beac1ad815b8..8dc9bca5a591c584be8c60bff9e4ba8355d58cc5 100644 (file)
@@ -25,8 +25,8 @@ perl_back_delete(
        Backend *be,
        Connection      *conn,
        Operation       *op,
-       const char      *dn,
-       const char      *ndn
+       struct berval   *dn,
+       struct berval   *ndn
 )
 {
        int len;
@@ -42,7 +42,7 @@ perl_back_delete(
 
                PUSHMARK(sp);
                XPUSHs( perl_back->pb_obj_ref );
-               XPUSHs(sv_2mortal(newSVpv( dn , 0 )));
+               XPUSHs(sv_2mortal(newSVpv( dn->bv_val , 0 )));
 
                PUTBACK;
 
@@ -70,6 +70,6 @@ perl_back_delete(
                        NULL, NULL, NULL, NULL );
        }
 
-       Debug( LDAP_DEBUG_ANY, "Here DELETE\n", 0, 0, 0 );
+       Debug( LDAP_DEBUG_ANY, "Perl DELETE\n", 0, 0, 0 );
        return( 0 );
 }
index 5b82a61bb1391526379091bad73ffd2c969fa730..5dce46eb72c4671ca37c2766d2aa9041062ebdbb 100644 (file)
@@ -6,7 +6,7 @@ LDAP_BEGIN_DECL
 
 extern BI_init perl_back_initialize;
 extern BI_open perl_back_open;
-extern BI_close        perl_back_close:
+extern BI_close        perl_back_close;
 extern BI_destroy      perl_back_destroy;
 
 extern BI_db_init      perl_back_db_init;
index aafd9fd63959a3cde57a6077557d5e228bbdf68e..dd09b933d78fc677f1d35a73ec202ddc2c7de8ce 100644 (file)
@@ -85,7 +85,7 @@ perl_back_initialize(
        bi->bi_db_destroy = perl_back_db_destroy;
 
        bi->bi_op_bind = perl_back_bind;
-       bi->bi_op_unbind = perl_back_unbind;
+       bi->bi_op_unbind = 0;
        bi->bi_op_search = perl_back_search;
        bi->bi_op_compare = perl_back_compare;
        bi->bi_op_modify = perl_back_modify;
index dda511b4070999d8163b69d2257dc5a55af16803..5122eb780c80a5c6568a46a62840e61633c6f70b 100644 (file)
@@ -26,9 +26,9 @@ perl_back_modify(
        Backend *be,
        Connection      *conn,
        Operation       *op,
-       const char      *dn,
-       const char      *ndn,
-       LDAPModList     *modlist
+       struct berval   *dn,
+       struct berval   *ndn,
+       Modifications   *modlist
 )
 {
        char test[500];
@@ -47,12 +47,12 @@ perl_back_modify(
                
                PUSHMARK(sp);
                XPUSHs( perl_back->pb_obj_ref );
-               XPUSHs(sv_2mortal(newSVpv( dn , 0)));
+               XPUSHs(sv_2mortal(newSVpv( dn->bv_val , 0)));
 
-               for (; modlist != NULL; modlist = modlist->ml_next ) {
-                       LDAPMod *mods = &modlist->ml_mod;
+               for (; modlist != NULL; modlist = modlist->sml_next ) {
+                       Modification *mods = &modlist->sml_mod;
 
-                       switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) {
+                       switch ( mods->sm_op & ~LDAP_MOD_BVALUES ) {
                        case LDAP_MOD_ADD:
                                XPUSHs(sv_2mortal(newSVpv("ADD", 0 )));
                                break;
@@ -67,13 +67,13 @@ perl_back_modify(
                        }
 
                        
-                       XPUSHs(sv_2mortal(newSVpv( mods->mod_type, 0 )));
+                       XPUSHs(sv_2mortal(newSVpv( mods->sm_type.bv_val, 0 )));
 
                        for ( i = 0;
-                               mods->mod_bvalues != NULL && mods->mod_bvalues[i] != NULL;
+                               mods->sm_bvalues != NULL && mods->sm_bvalues[i].bv_val != NULL;
                                i++ )
                        {
-                               XPUSHs(sv_2mortal(newSVpv( mods->mod_bvalues[i]->bv_val, 0 )));
+                               XPUSHs(sv_2mortal(newSVpv( mods->sm_bvalues[i].bv_val, 0 )));
                        }
                }
 
@@ -84,7 +84,7 @@ perl_back_modify(
                SPAGAIN;
 
                if (count != 1) {
-                       croak("Big trouble in back_search\n");
+                       croak("Big trouble in back_modify\n");
                }
                                                         
                return_code = POPi;
index c2f6ff19e7e8d36ecdc8c0124caef5b096fa305e..9aef7d9ae3c7bf3509d21eccebf024143dc69dd8 100644 (file)
@@ -39,11 +39,13 @@ perl_back_modrdn(
        Backend *be,
        Connection      *conn,
        Operation       *op,
-       const char      *dn,
-       const char      *ndn,
-       const char      *newrdn,
+       struct berval   *dn,
+       struct berval   *ndn,
+       struct berval   *newrdn,
+       struct berval   *nnewrdn,
        int             deleteoldrdn,
-       const char      *newSuperior
+       struct berval   *newSuperior,
+       struct berval   *nnewSuperior
 )
 {
        int len;
@@ -59,11 +61,11 @@ perl_back_modrdn(
                
                PUSHMARK(sp) ;
                XPUSHs( perl_back->pb_obj_ref );
-               XPUSHs(sv_2mortal(newSVpv( dn , 0 )));
-               XPUSHs(sv_2mortal(newSVpv( newrdn , 0 )));
+               XPUSHs(sv_2mortal(newSVpv( dn->bv_val , 0 )));
+               XPUSHs(sv_2mortal(newSVpv( newrdn->bv_val , 0 )));
                XPUSHs(sv_2mortal(newSViv( deleteoldrdn )));
                if ( newSuperior != NULL ) {
-                       XPUSHs(sv_2mortal(newSVpv( newSuperior , 0 )));
+                       XPUSHs(sv_2mortal(newSVpv( newSuperior->bv_val , 0 )));
                }
                PUTBACK ;
 
@@ -72,7 +74,7 @@ perl_back_modrdn(
                SPAGAIN ;
 
                if (count != 1) {
-                       croak("Big trouble in back_search\n") ;
+                       croak("Big trouble in back_modrdn\n") ;
                }
                                                         
                return_code = POPi;
@@ -94,5 +96,3 @@ perl_back_modrdn(
        Debug( LDAP_DEBUG_ANY, "Perl MODRDN\n", 0, 0, 0 );
        return( 0 );
 }
-
-
index 1e71424d67163051af324aee20dc263a521667ee..bedc09f9c9be6ce4398822a23a49c4dbb9c53781 100644 (file)
@@ -31,14 +31,14 @@ perl_back_search(
        Backend *be,
        Connection *conn,
        Operation *op,
-       const char *base,
-       const char *nbase,
+       struct berval *base,
+       struct berval *nbase,
        int scope,
        int deref,
        int sizelimit,
        int timelimit,
        Filter *filter,
-       const char *filterstr,
+       struct berval *filterstr,
        AttributeName *attrs,
        int attrsonly
        )
@@ -61,7 +61,7 @@ perl_back_search(
 
                PUSHMARK(sp) ;
                XPUSHs( perl_back->pb_obj_ref );
-               XPUSHs(sv_2mortal(newSVpv( filterstr , 0)));
+               XPUSHs(sv_2mortal(newSVpv( filterstr->bv_val , 0)));
                XPUSHs(sv_2mortal(newSViv( sizelimit )));
                XPUSHs(sv_2mortal(newSViv( timelimit )));
                XPUSHs(sv_2mortal(newSViv( attrsonly )));