From a3e6048359f047cf1d3afd1e919649dd5e389d80 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 26 Dec 2001 22:53:54 +0000 Subject: [PATCH] Update to new struct berval DN API --- servers/slapd/back-shell/compare.c | 6 +++--- servers/slapd/back-shell/delete.c | 6 +++--- servers/slapd/back-shell/modify.c | 6 +++--- servers/slapd/back-shell/modrdn.c | 16 +++++++++------- servers/slapd/back-shell/search.c | 6 +++--- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/servers/slapd/back-shell/compare.c b/servers/slapd/back-shell/compare.c index 6e68ae90f5..95c91f576b 100644 --- a/servers/slapd/back-shell/compare.c +++ b/servers/slapd/back-shell/compare.c @@ -20,8 +20,8 @@ shell_back_compare( Backend *be, Connection *conn, Operation *op, - const char *dn, - const char *ndn, + struct berval *dn, + struct berval *ndn, AttributeAssertion *ava ) { @@ -50,7 +50,7 @@ shell_back_compare( fprintf( wfp, "COMPARE\n" ); fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid ); print_suffixes( wfp, be ); - fprintf( wfp, "dn: %s\n", dn ); + fprintf( wfp, "dn: %s\n", dn->bv_val ); fprintf( wfp, "%s: %s\n", ava->aa_desc->ad_cname.bv_val, ava->aa_value->bv_val /* could be binary! */ ); diff --git a/servers/slapd/back-shell/delete.c b/servers/slapd/back-shell/delete.c index feb737fe35..d611a17120 100644 --- a/servers/slapd/back-shell/delete.c +++ b/servers/slapd/back-shell/delete.c @@ -20,8 +20,8 @@ shell_back_delete( Backend *be, Connection *conn, Operation *op, - const char *dn, - const char *ndn + struct berval *dn, + struct berval *ndn ) { struct shellinfo *si = (struct shellinfo *) be->be_private; @@ -44,7 +44,7 @@ shell_back_delete( fprintf( wfp, "DELETE\n" ); fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid ); print_suffixes( wfp, be ); - fprintf( wfp, "dn: %s\n", dn ); + fprintf( wfp, "dn: %s\n", dn->bv_val ); fclose( wfp ); /* read in the results and send them along */ diff --git a/servers/slapd/back-shell/modify.c b/servers/slapd/back-shell/modify.c index 3eb2e2e1ea..488d8c5da6 100644 --- a/servers/slapd/back-shell/modify.c +++ b/servers/slapd/back-shell/modify.c @@ -20,8 +20,8 @@ shell_back_modify( Backend *be, Connection *conn, Operation *op, - const char *dn, - const char *ndn, + struct berval *dn, + struct berval *ndn, Modifications *ml ) { @@ -47,7 +47,7 @@ shell_back_modify( fprintf( wfp, "MODIFY\n" ); fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid ); print_suffixes( wfp, be ); - fprintf( wfp, "dn: %s\n", dn ); + fprintf( wfp, "dn: %s\n", dn->bv_val ); for ( ; ml != NULL; ml = ml->sml_next ) { mod = &ml->sml_mod; diff --git a/servers/slapd/back-shell/modrdn.c b/servers/slapd/back-shell/modrdn.c index ec831f1ce0..7828aca039 100644 --- a/servers/slapd/back-shell/modrdn.c +++ b/servers/slapd/back-shell/modrdn.c @@ -33,11 +33,13 @@ shell_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 ) { struct shellinfo *si = (struct shellinfo *) be->be_private; @@ -60,11 +62,11 @@ shell_back_modrdn( fprintf( wfp, "MODRDN\n" ); fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid ); print_suffixes( wfp, be ); - fprintf( wfp, "dn: %s\n", dn ); - fprintf( wfp, "newrdn: %s\n", newrdn ); + fprintf( wfp, "dn: %s\n", dn->bv_val ); + fprintf( wfp, "newrdn: %s\n", newrdn->bv_val ); fprintf( wfp, "deleteoldrdn: %d\n", deleteoldrdn ? 1 : 0 ); if (newSuperior != NULL) { - fprintf( wfp, "newSuperior: %s\n", newSuperior ); + fprintf( wfp, "newSuperior: %s\n", newSuperior->bv_val ); } fclose( wfp ); diff --git a/servers/slapd/back-shell/search.c b/servers/slapd/back-shell/search.c index e4f676e5da..89ab6b83eb 100644 --- a/servers/slapd/back-shell/search.c +++ b/servers/slapd/back-shell/search.c @@ -20,8 +20,8 @@ shell_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 size, @@ -53,7 +53,7 @@ shell_back_search( fprintf( wfp, "SEARCH\n" ); fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid ); print_suffixes( wfp, be ); - fprintf( wfp, "base: %s\n", base ); + fprintf( wfp, "base: %s\n", base->bv_val ); fprintf( wfp, "scope: %d\n", scope ); fprintf( wfp, "deref: %d\n", deref ); fprintf( wfp, "sizelimit: %d\n", size ); -- 2.39.5