+
+ bsrq.setname = req->resultSetName;
+ bsrq.replace_set = *req->replaceIndicator;
+ bsrq.num_bases = req->num_databaseNames;
+ bsrq.basenames = req->databaseNames;
+ bsrq.query = req->query;
+
+ if (!(bsrt = bend_search(assoc->backend, &bsrq, fd)))
+ return 0;
+ return response_searchRequest(assoc, reqb, bsrt, fd);
+}
+
+bend_searchresult *bend_searchresponse(void *handle) {return 0;}
+
+/*
+ * Prepare a searchresponse based on the backend results. We probably want
+ * to look at making the fetching of records nonblocking as well, but
+ * so far, we'll keep things simple.
+ * If bsrt is null, that means we're called in response to a communications
+ * event, and we'll have to get the response for ourselves.
+ */
+static Z_APDU *response_searchRequest(association *assoc, request *reqb,
+ bend_searchresult *bsrt, int *fd)
+{
+ Z_SearchRequest *req = reqb->request->u.searchRequest;
+ static Z_APDU apdu;
+ static Z_SearchResponse resp;
+ static int nulint = 0;
+ static bool_t sr = 1;
+ static int next = 0;
+ static int none = Z_RES_NONE;
+