uint32_t version;
};
+struct query_rows_info {
+ struct query_rows_info *prev, *next;
+ uint32_t handle;
+ uint32_t rowstart_index; /* index where 'rows' starts */
+ uint32_t total_rows; /* num rows stored*/
+ bool nomorerowstoreturn; /* num rows stored*/
+ /*includes those processed already*/
+ struct wsp_cbasestoragevariant **rows;
+};
+
struct gss_state {
struct uint32_list *connectedclientsidentifiers;
struct client_version_map *connectedclientversions;
+ struct query_rows_info *query_info_map;
enum wsp_server_state wsp_server_state;
struct tevent_context *ev;
struct messaging_context *msg_ctx;
uint32_t fid;
};
+static struct query_rows_info *find_query_rows_info(uint32_t handle,
+ struct gss_state *gss_state)
+{
+ struct query_rows_info *item;
+ for (item = gss_state->query_info_map; item; item = item->next){
+ if (item->handle == handle) {
+ return item;
+ }
+ }
+ return NULL;
+}
+
/* return the abstract inteface implemenation for the specified backend */
static struct wsp_abstract_interface *get_impl(void)
{
struct wsp_cpidmapper *pidmapper = NULL;
struct wsp_ccolumngrouparray *grouparray = NULL;
+ struct query_rows_info *info = NULL;
struct tevent_req *req, *subreq = NULL;
struct create_query_state *state = NULL;
NTSTATUS status;
int ndr_flags = NDR_SCALARS | NDR_BUFFERS;
DATA_BLOB payload = {0};
+ info = find_query_rows_info(handle, gss_state);
+
+ /*
+ * #FIXME #TODO need to investigate this a bit, the
+ * query related data here should only be for
+ * running query ??? if so finding an existing
+ * info would be an error. If this information really
+ * is only relevant for a running query then we
+ * don't need to store this in a map!!
+ */
+ if (!info) {
+ info = talloc_zero(gss_state, struct query_rows_info);
+ if (info == NULL) {
+ DBG_ERR("out of memory\n");
+ return NULL;
+ }
+ info->handle = handle;
+ DLIST_ADD_END(gss_state->query_info_map, info);
+ }
+
req = tevent_req_create(gss_state, &state, struct create_query_state);
if (!req) {
return NULL;