]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-tcl/tcl_search.c
Add dummy reference to lutil_uuidstr() for dynamically loaded back-bdb
[openldap] / servers / slapd / back-tcl / tcl_search.c
index b4c886e7640ae12e3ccacca29b8ef72ded9d6010..533268d2914bb4da987f8fd9dbb0f806424e989a 100644 (file)
@@ -47,12 +47,12 @@ tcl_back_search (
 
        for (i = 0, an = attrs; an && an->an_name.bv_val; an++, i++);
        if (i > 0) {
-               char *sattrs[i+1];
-
+               char **sattrs = ch_malloc( (i+1) * sizeof(char *));
                for (i = 0, an = attrs; an->an_name.bv_val; an++, i++)
                        sattrs[i] = an->an_name.bv_val;
                sattrs[i] = NULL;
                attrs_tcl = Tcl_Merge (i, sattrs);
+               ch_free(sattrs);
        }
 
        if (tcl_merge_bvlist (be->be_suffix, &suf_tcl) == NULL) {
@@ -63,12 +63,12 @@ tcl_back_search (
        }
 
        command = (char *) ch_malloc (ti->ti_search.bv_len + suf_tcl.bv_len
-               + base->bv_len + 40 + filterstr->bv_len + 
+               + base->bv_len + 60 + filterstr->bv_len + 
                (attrs_tcl == NULL ? 5 : strlen (attrs_tcl)) + 72);
        sprintf (command,
-               "%s SEARCH {%ld} {%s} {%s} {%d} {%d} {%d} {%d} {%s} {%d} {%s}",
-               ti->ti_search.bv_val, (long) op->o_msgid, suf_tcl.bv_val, 
-               base->bv_val, scope, deref,
+               "%s SEARCH {%ld/%ld} {%s} {%s} {%d} {%d} {%d} {%d} {%s} {%d} {%s}",
+               ti->ti_search.bv_val, op->o_connid, (long) op->o_msgid,
+               suf_tcl.bv_val, base->bv_val, scope, deref,
                sizelimit, timelimit, filterstr->bv_val, attrsonly ? 1 : 0,
                attrs_tcl == NULL ? "{all}" : attrs_tcl);
        Tcl_Free (attrs_tcl);