Changeset 18336 for trunk/ippTools/src/stacktool.c
- Timestamp:
- Jun 26, 2008, 3:39:54 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/stacktool.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/stacktool.c
r18152 r18336 41 41 static bool revertsumskyfileMode(pxConfig *config); 42 42 43 static bool setstackRunState(pxConfig *config, const char *stack_id, const char *state);43 static bool setstackRunState(pxConfig *config, psS64 stack_id, const char *state); 44 44 45 45 # define MODECASE(caseName, func) \ … … 486 486 PS_ASSERT_PTR_NON_NULL(config, false); 487 487 488 PXOPT_LOOKUP_S TR(stack_id, config->args, "-stack_id", true, false);488 PXOPT_LOOKUP_S64(stack_id, config->args, "-stack_id", true, false); 489 489 PXOPT_LOOKUP_STR(state, config->args, "-state", true, false); 490 490 … … 502 502 PS_ASSERT_PTR_NON_NULL(config, false); 503 503 504 PXOPT_LOOKUP_S TR(stack_id, config->args, "-stack_id", true, false);505 PXOPT_LOOKUP_S TR(warp_id, config->args, "-warp_id", true, false);504 PXOPT_LOOKUP_S64(stack_id, config->args, "-stack_id", true, false); 505 PXOPT_LOOKUP_S64(warp_id, config->args, "-warp_id", true, false); 506 506 507 507 // XXX need to validate the warp_id here … … 509 509 // constrants 510 510 if (!stackInputSkyfileInsert(config->dbh, 511 (psS64)atoll(stack_id),512 (psS64)atoll(warp_id)511 stack_id, 512 warp_id 513 513 )) { 514 514 psError(PS_ERR_UNKNOWN, false, "database error"); … … 574 574 575 575 if (psArrayLength(output)) { 576 if (!convertIdToStr(output)) {577 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");578 psFree(output);579 return false;580 }581 582 576 // negative simple so the default is true 583 577 if (!ippdbPrintMetadatas(stdout, output, "stackInputSkyfile", !simple)) { … … 648 642 649 643 if (psArrayLength(output)) { 650 if (!convertIdToStr(output)) {651 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");652 psFree(output);653 return false;654 }655 656 644 // negative simple so the default is true 657 645 if (!ippdbPrintMetadatas(stdout, output, "stackSumSkyfile", !simple)) { … … 673 661 674 662 // required 675 PXOPT_LOOKUP_S TR(stack_id, config->args, "-stack_id", true, false);663 PXOPT_LOOKUP_S64(stack_id, config->args, "-stack_id", true, false); 676 664 677 665 // optional … … 696 684 // constrants 697 685 if (!stackSumSkyfileInsert(config->dbh, 698 (psS64)atoll(stack_id),686 stack_id, 699 687 uri, 700 688 path_base, … … 785 773 786 774 if (psArrayLength(output)) { 787 if (!convertIdToStr(output)) {788 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");789 psFree(output);790 return false;791 }792 793 775 if (!ippdbPrintMetadatas(stdout, output, "stackSumSkyfile", !simple)) { 794 776 psError(PS_ERR_UNKNOWN, false, "failed to print array"); … … 836 818 837 819 838 static bool setstackRunState(pxConfig *config, const char *stack_id, const char *state) 839 { 840 PS_ASSERT_PTR_NON_NULL(stack_id, false); 820 static bool setstackRunState(pxConfig *config, psS64 stack_id, const char *state) 821 { 841 822 PS_ASSERT_PTR_NON_NULL(state, false); 842 823 … … 853 834 } 854 835 855 char *query = "UPDATE stackRun SET state = '%s' WHERE stack_id = '%s'";836 char *query = "UPDATE stackRun SET state = '%s' WHERE stack_id = %"PRId64; 856 837 if (!p_psDBRunQuery(config->dbh, query, state, stack_id)) { 857 838 psError(PS_ERR_UNKNOWN, false, 858 "failed to change state for stack_id % s", stack_id);859 return false; 860 } 861 862 return true; 863 } 839 "failed to change state for stack_id %"PRId64, stack_id); 840 return false; 841 } 842 843 return true; 844 }
Note:
See TracChangeset
for help on using the changeset viewer.
