Changeset 15765
- Timestamp:
- Dec 7, 2007, 3:20:29 PM (18 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
flatcorr.c (modified) (1 diff)
-
flatcorrConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/flatcorr.c
r15758 r15765 526 526 PS_ASSERT_PTR_NON_NULL(config, false); 527 527 528 bool status = false; 529 psString corr_id = psMetadataLookupStr(&status, config->args, "-corr_id"); 530 if (!status) { 531 psError(PXTOOLS_ERR_PROG, false, "failed to lookup value for -corr_id"); 532 return false; 533 } 534 535 psString stats = psMetadataLookupStr(&status, config->args, "-stats"); 536 if (!status) { 537 psError(PXTOOLS_ERR_PROG, false, "failed to lookup value for -stats"); 538 return false; 539 } 540 541 if (!psDBTransaction(config->dbh)) { 542 psError(PS_ERR_UNKNOWN, false, "database error"); 543 return false; 544 } 545 546 if (!setflatcorrRunState(config, (psS64)atoll(corr_id), "stop")) { 547 if (!psDBRollback(config->dbh)) { 548 psError(PS_ERR_UNKNOWN, false, "database error"); 549 } 550 psError(PS_ERR_UNKNOWN, false, "failed to set run state"); 551 return false; 552 } 553 554 char *query = "UPDATE flatcorrRun SET stats = '%s' WHERE corr_id = %" PRId64; 555 if (!p_psDBRunQuery(config->dbh, query, stats, (psS64)atoll(corr_id))) { 556 psError(PS_ERR_UNKNOWN, false, 557 "failed to change state for corr_id %" PRId64, (psS64)atoll(corr_id)); 558 return false; 559 } 560 561 if (!psDBCommit(config->dbh)) { 562 psError(PS_ERR_UNKNOWN, false, "database error"); 563 return false; 564 } 565 528 566 return false; 529 567 } -
trunk/ippTools/src/flatcorrConfig.c
r15758 r15765 158 158 "define correction id (required)", NULL); 159 159 psMetadataAddStr(doneArgs, PS_LIST_TAIL, "-stats", 0, 160 "define stats ", NULL);160 "define stats (required)", NULL); 161 161 162 162 psFree(now);
Note:
See TracChangeset
for help on using the changeset viewer.
