Changeset 18244
- Timestamp:
- Jun 20, 2008, 10:28:17 AM (18 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
pstamptool.c (modified) (3 diffs)
-
pstamptoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pstamptool.c
r16957 r18244 336 336 char *query ="INSERT INTO pstampRequest" 337 337 " (state, uri, ds_id, outFileset, resultsFile)" 338 " VALUES( 'new', '%s', %s, '%s', 1)";338 " VALUES( 'new', '%s', %s, '%s', 0)"; 339 339 340 340 if (!p_psDBRunQuery(config->dbh, query, uri, ds_id, outFileset)) { … … 567 567 } 568 568 if (job_type) { 569 if (!strcmp(job_type, "get_image") ) {569 if (!strcmp(job_type, "get_image") || !strcmp(job_type, "detect_query")) { 570 570 stampJob = false; 571 571 } else if (!strcmp(job_type, "stamp")) { … … 622 622 } 623 623 624 psString stateString = psMetadataLookupStr(&status, config->args, "-state"); 625 if (!status) { 626 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -state"); 627 return false; 628 } 629 if (!stateString) { 630 stateString = "run"; 631 } 632 psString result = psMetadataLookupStr(&status, config->args, "-result"); 633 if (!status) { 634 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -result"); 635 return false; 636 } 637 if (!result) { 638 result = "0"; 639 } 640 624 641 char *query; 625 642 626 643 if (stampJob) { 627 644 query ="INSERT INTO pstampJob" 628 " (req_id, state, jobType, uri, outputBase, args)"629 " VALUES( %s, ' run', '%s', '%s', '%s', '%s')";645 " (req_id, state, jobType, uri, outputBase, result, args)" 646 " VALUES( %s, '%s', '%s', '%s', '%s', %s, '%s')"; 630 647 } else { 631 648 query ="INSERT INTO pstampJob" 632 " (req_id, state, jobType, uri, outputBase )"633 " VALUES( %s, ' run', '%s', '%s', '%s')";634 } 635 636 if (!p_psDBRunQuery(config->dbh, query, req_id, job_type, uri, outputBase, argString)) {649 " (req_id, state, jobType, uri, outputBase, result)" 650 " VALUES( %s, '%s', '%s', '%s', '%s', %s)"; 651 } 652 653 if (!p_psDBRunQuery(config->dbh, query, req_id, stateString, job_type, uri, outputBase, result, argString)) { 637 654 psError(PS_ERR_UNKNOWN, false, "database error"); 638 655 return false; -
trunk/ippTools/src/pstamptoolConfig.c
r18172 r18244 119 119 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-args", 0, 120 120 "define job args", NULL); 121 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-state", 0, 122 "new state", NULL); 123 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-result", 0, 124 "new result", NULL); 121 125 122 126 // -listjob
Note:
See TracChangeset
for help on using the changeset viewer.
