]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-perl/search.c
Add a default case with assert() just in case.
[openldap] / servers / slapd / back-perl / search.c
index 16648d658c409ea603e7f68741dcafe8f93e08a7..1e71424d67163051af324aee20dc263a521667ee 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  *      Copyright 1999, John C. Quillan, All rights reserved.
  *
@@ -30,14 +31,15 @@ perl_back_search(
        Backend *be,
        Connection *conn,
        Operation *op,
-       char *base,
+       const char *base,
+       const char *nbase,
        int scope,
        int deref,
        int sizelimit,
        int timelimit,
        Filter *filter,
-       char *filterstr,
-       char **attrs,
+       const char *filterstr,
+       AttributeName *attrs,
        int attrsonly
        )
 {
@@ -46,6 +48,7 @@ perl_back_search(
        int err = 0;
        char *matched = NULL, *info = NULL;
        PerlBackend *perl_back = (PerlBackend *)be->be_private;
+       AttributeName *an;
        Entry   *e;
        char *buf;
        int i;
@@ -63,8 +66,8 @@ perl_back_search(
                XPUSHs(sv_2mortal(newSViv( timelimit )));
                XPUSHs(sv_2mortal(newSViv( attrsonly )));
 
-               for ( i = 0; attrs != NULL && attrs[i] != NULL; i++ ) {
-                       XPUSHs(sv_2mortal(newSVpv( attrs[i] , 0)));
+               for ( an = attrs; an && an->an_name.bv_val; an++ ) {
+                       XPUSHs(sv_2mortal(newSVpv( an->an_name.bv_val , 0)));
                }
                PUTBACK;
 
@@ -87,7 +90,7 @@ perl_back_search(
 
                                } else {
                                        send_search_entry( be, conn, op,
-                                               e, attrs, attrsonly, 0, NULL );
+                                               e, attrs, attrsonly, NULL );
                                                         
                                        entry_free( e );
                                }