From: Howard Chu Date: Sat, 2 Feb 2002 10:10:35 +0000 (+0000) Subject: API updates, some typo fixes X-Git-Tag: OPENLDAP_REL_ENG_2_1_BP~96 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=73c87065fb84af6536b06d62bc322070fc53a1cd;p=openldap API updates, some typo fixes --- diff --git a/servers/slapd/back-perl/add.c b/servers/slapd/back-perl/add.c index 707b140f94..83509188d6 100644 --- a/servers/slapd/back-perl/add.c +++ b/servers/slapd/back-perl/add.c @@ -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 ); } diff --git a/servers/slapd/back-perl/bind.c b/servers/slapd/back-perl/bind.c index 4801400fea..fccc8e840a 100644 --- a/servers/slapd/back-perl/bind.c +++ b/servers/slapd/back-perl/bind.c @@ -76,5 +76,3 @@ perl_back_bind( return ( return_code ); } - - diff --git a/servers/slapd/back-perl/compare.c b/servers/slapd/back-perl/compare.c index 82d445ba0d..b490b197da 100644 --- a/servers/slapd/back-perl/compare.c +++ b/servers/slapd/back-perl/compare.c @@ -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); } diff --git a/servers/slapd/back-perl/config.c b/servers/slapd/back-perl/config.c index f68a0a1282..fd3105aa7e 100644 --- a/servers/slapd/back-perl/config.c +++ b/servers/slapd/back-perl/config.c @@ -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 ); } } diff --git a/servers/slapd/back-perl/delete.c b/servers/slapd/back-perl/delete.c index 25870de2ae..8dc9bca5a5 100644 --- a/servers/slapd/back-perl/delete.c +++ b/servers/slapd/back-perl/delete.c @@ -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 ); } diff --git a/servers/slapd/back-perl/external.h b/servers/slapd/back-perl/external.h index 5b82a61bb1..5dce46eb72 100644 --- a/servers/slapd/back-perl/external.h +++ b/servers/slapd/back-perl/external.h @@ -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; diff --git a/servers/slapd/back-perl/init.c b/servers/slapd/back-perl/init.c index aafd9fd639..dd09b933d7 100644 --- a/servers/slapd/back-perl/init.c +++ b/servers/slapd/back-perl/init.c @@ -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; diff --git a/servers/slapd/back-perl/modify.c b/servers/slapd/back-perl/modify.c index dda511b407..5122eb780c 100644 --- a/servers/slapd/back-perl/modify.c +++ b/servers/slapd/back-perl/modify.c @@ -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; diff --git a/servers/slapd/back-perl/modrdn.c b/servers/slapd/back-perl/modrdn.c index c2f6ff19e7..9aef7d9ae3 100644 --- a/servers/slapd/back-perl/modrdn.c +++ b/servers/slapd/back-perl/modrdn.c @@ -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 ); } - - diff --git a/servers/slapd/back-perl/search.c b/servers/slapd/back-perl/search.c index 1e71424d67..bedc09f9c9 100644 --- a/servers/slapd/back-perl/search.c +++ b/servers/slapd/back-perl/search.c @@ -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 )));