From d7c4b1a05a1c00731fdc6b232f8f24eac42d53fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Thu, 13 Oct 2005 12:56:55 +0000 Subject: [PATCH] proper attribute prefixes --- org.glite.jp.index/src/conf.c | 14 +++++--------- org.glite.jp.index/src/soap_ops.c | 10 +++++----- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/org.glite.jp.index/src/conf.c b/org.glite.jp.index/src/conf.c index 9d8eaaa..d77c7db 100644 --- a/org.glite.jp.index/src/conf.c +++ b/org.glite.jp.index/src/conf.c @@ -20,19 +20,15 @@ int glite_jp_get_conf(int argc, char **argv, char *config_file, glite_jp_is_conf conf = calloc(1, sizeof(*conf)); - conf->attrs = calloc(8, sizeof(*conf->attrs)); - conf->attrs[0] = strdup("owner"); - conf->attrs[1] = strdup("status"); - conf->attrs[2] = strdup("location"); - conf->attrs[3] = strdup("jobid"); - conf->attrs[4] = strdup("user"); - conf->attrs[5] = strdup("tag"); - conf->attrs[6] = strdup("host"); + conf->attrs = calloc(3, sizeof(*conf->attrs)); + conf->attrs[0] = strdup("http://egee.cesnet.cz/en/WSDL/jp-system:owner"); + conf->attrs[1] = strdup("http://egee.cesnet.cz/en/WSDL/jp-system:jobId"); + conf->attrs[2] = strdup("http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus"); conf->indexed_attrs = calloc(4, sizeof(*conf->indexed_attrs)); conf->indexed_attrs[0] = strdup("owner"); conf->indexed_attrs[1] = strdup("user"); - conf->indexed_attrs[2] = strdup("location"); + conf->indexed_attrs[2] = strdup("finalStatus"); // XXX: some plugin names should come here in future conf->plugins = NULL; diff --git a/org.glite.jp.index/src/soap_ops.c b/org.glite.jp.index/src/soap_ops.c index 85a7af7..7e56343 100644 --- a/org.glite.jp.index/src/soap_ops.c +++ b/org.glite.jp.index/src/soap_ops.c @@ -188,9 +188,9 @@ static void add_attr_table(char *new, char ***attr_tables) if (!strcmp(*attr_tables[i], new)) return; } -// *attr_tables = realloc((*attr_tables), (i+2) * sizeof(**attr_tables)); -// *attr_tables[i] = strdup(new); -// *attr_tables[i+1] = NULL; + *attr_tables = realloc((*attr_tables), (i+2) * sizeof(**attr_tables)); + *attr_tables[i] = strdup(new); + *attr_tables[i+1] = NULL; } /* transform soap enum queryOp to mysql quivalent */ @@ -273,8 +273,8 @@ static int get_jobids(struct soap *soap, glite_jpis_context_t ctx, struct _jpele free(qa); qa = qb; qb = NULL; } // XXX : memory destroyed somewhere (add_attr_table commented out too :( - //trio_asprintf(&query, "SELECT dg_jobid FROM jobs%s WHERE %s;", qa, qwhere); -trio_asprintf(&query, "SELECT dg_jobid FROM jobs%s WHERE %s;", ",attr_d5189de027922f81005951e6efe0efd5", qwhere); + trio_asprintf(&query, "SELECT dg_jobid FROM jobs%s WHERE %s;", qa, qwhere); +//trio_asprintf(&query, "SELECT dg_jobid FROM jobs%s WHERE %s;", ",attr_d5189de027922f81005951e6efe0efd5", qwhere); free(qwhere); free(qa); -- 1.8.2.3