Changeset 42837 for trunk/ippTools/src/pztool.c
- Timestamp:
- May 9, 2025, 9:40:41 AM (14 months ago)
- Location:
- trunk/ippTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools
-
trunk/ippTools/src
- Property svn:ignore
-
old new 50 50 remotetool 51 51 fpcamtool 52 xcstacktool 53 xcskytool 54 xcfftool
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
trunk/ippTools/src/pztool.c
r41598 r42837 50 50 static bool updatenewexpMode(pxConfig *config); 51 51 52 // XXX EAM : 2021.05.18 : code for updatesummitExp was added but not finished. 53 // XXX static bool updatesummitExpMode(pxConfig *config); 52 static bool updatesummitExpMode(pxConfig *config); 54 53 55 54 // static bool copydoneCompleteExp(pxConfig *config); … … 93 92 MODECASE(PZTOOL_MODE_UPDATEPZEXP, updatepzexpMode); 94 93 MODECASE(PZTOOL_MODE_UPDATENEWEXP, updatenewexpMode); 95 // XXXMODECASE(PZTOOL_MODE_UPDATESUMMITEXP, updatesummitExpMode);94 MODECASE(PZTOOL_MODE_UPDATESUMMITEXP, updatesummitExpMode); 96 95 default: 97 96 psAbort("invalid option (this should not happen)"); … … 810 809 } 811 810 812 813 811 static bool updatecopiedMode(pxConfig *config) 814 812 { … … 939 937 } 940 938 941 # if (0) 942 static bool summitExpSetFault(pxConfig *config, const psS64 summit_id, const int fault) 939 static bool summitExpSetFault(pxConfig *config, const psString exp_name, const psS64 summit_id, const int fault) 943 940 { 944 941 // check that state is a valid string value … … 949 946 } 950 947 951 char *query = "UPDATE summitExp SET fault = %d WHERE summit_id = %ld ";952 if (!p_psDBRunQueryF(config->dbh, query, fault, summit_id )) {953 psError(PS_ERR_UNKNOWN, false, "failed to change state for %lld", (long long) summit_id);948 char *query = "UPDATE summitExp SET fault = %d WHERE summit_id = %ld AND exp_name = '%s'"; 949 if (!p_psDBRunQueryF(config->dbh, query, fault, summit_id, exp_name)) { 950 psError(PS_ERR_UNKNOWN, false, "failed to change state for %s = %lld", exp_name, (long long) summit_id); 954 951 return false; 955 952 } … … 960 957 static bool updatesummitExpMode(pxConfig *config) 961 958 { 962 int fault; 963 959 // require both exp_name and summit_id as a double-check 964 960 PS_ASSERT_PTR_NON_NULL(config, false); 965 961 PXOPT_LOOKUP_S64(summit_id, config->args, "-summit_id", true, false); 966 PXOPT_LOOKUP_S32(state, config->args, "-set_fault",true, false); 967 968 if (!summitExpSetFault(config,summit_id, fault)) { 969 psError(PS_ERR_UNKNOWN, false, "failed to change state for %lld", (long long) summit_id); 970 return false; 962 PXOPT_LOOKUP_STR(exp_name, config->args, "-exp_name", true, false); 963 PXOPT_LOOKUP_S32(fault, config->args, "-set_fault", true, false); 964 965 if (!summitExpSetFault(config, exp_name, summit_id, fault)) { 966 psError(PS_ERR_UNKNOWN, false, "failed to change state for %s = %lld", exp_name, (long long) summit_id); 967 return false; 971 968 } 972 969 return true; 973 970 } 974 # endif975 971 976 972 static bool updatepzexpMode(pxConfig *config)
Note:
See TracChangeset
for help on using the changeset viewer.
