X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fseshigh.c;h=d357095a9386ba4bfe02792b43daff935278ec55;hp=898af566bae031ae459fb8167a12c4a8531a6196;hb=4b72516157f967c0bf70e1ca1e61e89a6c7daa5e;hpb=69b1d8e7b437179163fe97b7cbead51a56835f2a diff --git a/src/seshigh.c b/src/seshigh.c index 898af56..d357095 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2681,7 +2681,9 @@ static Z_APDU *process_searchRequest(association *assoc, request *reqb) bsrr->errcode = 0; bsrr->errstring = NULL; bsrr->search_info = NULL; - bsrr->search_input = req->otherInfo; + bsrr->search_input = req->additionalSearchInfo; + if (!bsrr->search_input) + bsrr->search_input = req->otherInfo; bsrr->present_number = *req->mediumSetPresentNumber; if (assoc->server && assoc->server->cql_transform @@ -3098,7 +3100,6 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb) { Z_Entry *e; Z_TermInfo *t; - Odr_oct *o; tab[i] = e = (Z_Entry *)odr_malloc(assoc->encode, sizeof(*e)); if (bsrr->entries[i].occurrences >= 0) @@ -3125,15 +3126,10 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb) t->term = (Z_Term *) odr_malloc(assoc->encode, sizeof(*t->term)); t->term->which = Z_Term_general; - t->term->u.general = o = - (Odr_oct *)odr_malloc(assoc->encode, sizeof(Odr_oct)); - o->buf = (char *) - odr_malloc(assoc->encode, o->len = - strlen(bsrr->entries[i].term)); -#if OCT_SIZE - o->size = o->len; -#endif - memcpy(o->buf, bsrr->entries[i].term, o->len); + t->term->u.general = + odr_create_Odr_oct(assoc->encode, + bsrr->entries[i].term, + strlen(bsrr->entries[i].term)); yaz_log(YLOG_DEBUG, " term #%d: '%s' (" ODR_INT_PRINTF ")", i, bsrr->entries[i].term, bsrr->entries[i].occurrences); }