diff options
| author | David Sommerseth <davids@redhat.com> | 2009-10-21 09:06:27 +0200 |
|---|---|---|
| committer | David Sommerseth <davids@redhat.com> | 2009-10-21 09:06:27 +0200 |
| commit | 6e90b1e99b02a9cac45686c63ddeeae044466aca (patch) | |
| tree | 4f7d153895316d5d219a6b2fd55bf79bfaeda341 /server/parser/xmlparser.c | |
| parent | d783165fc3c7e0ee32df7337e322199711955813 (diff) | |
Extended rtevalruns table to contain a submid field
This new field references submissionqueue.submid, to keep a link
between parsed rtevalruns and the original submission.
Diffstat (limited to 'server/parser/xmlparser.c')
| -rw-r--r-- | server/parser/xmlparser.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/server/parser/xmlparser.c b/server/parser/xmlparser.c index a5169f4..7d14eca 100644 --- a/server/parser/xmlparser.c +++ b/server/parser/xmlparser.c @@ -86,7 +86,8 @@ static char *encapsInt(const unsigned int val) { xmlDoc *parseToSQLdata(xsltStylesheet *xslt, xmlDoc *indata_d, parseParams *params) { xmlDoc *result_d = NULL; char *xsltparams[10]; - unsigned int idx = 0, idx_table = 0, idx_syskey = 0, idx_rterid = 0, idx_repfname = 0; + unsigned int idx = 0, idx_table = 0, idx_submid = 0, + idx_syskey = 0, idx_rterid = 0, idx_repfname = 0; if( params->table == NULL ) { fprintf(stderr, "Table is not defined\n"); @@ -98,6 +99,12 @@ xmlDoc *parseToSQLdata(xsltStylesheet *xslt, xmlDoc *indata_d, parseParams *para xsltparams[idx] = (char *) encapsString(params->table); idx_table = idx++; + if( params->submid > 0) { + xsltparams[idx++] = "submid\0"; + xsltparams[idx] = (char *) encapsInt(params->submid); + idx_submid = idx++; + } + if( params->syskey > 0) { xsltparams[idx++] = "syskey\0"; xsltparams[idx] = (char *) encapsInt(params->syskey); @@ -125,6 +132,9 @@ xmlDoc *parseToSQLdata(xsltStylesheet *xslt, xmlDoc *indata_d, parseParams *para // Free memory we allocated via encapsString()/encapsInt() free(xsltparams[idx_table]); + if( params->submid ) { + free(xsltparams[idx_submid]); + } if( params->syskey ) { free(xsltparams[idx_syskey]); } |
