Changeset 28146 for trunk/ippTools/src
- Timestamp:
- May 27, 2010, 1:37:11 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pstamptool.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pstamptool.c
r28145 r28146 30 30 #include "pxdata.h" 31 31 #include "pstamptool.h" 32 #include "pstamp.h" 32 33 33 34 static bool adddatastoreMode(pxConfig *config); … … 941 942 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 942 943 943 // By default only revert faults < 10which are our "ipp exit codes"944 // By default only revert faults < PSTAMP_FIRST_ERROR_CODE which are our "ipp exit codes" 944 945 // codes larger than that are the pstamp request interface. 945 946 // Don't fault those unless -fault waa provided 946 psString faultClause = "";947 psString faultClause = psStringCopy(""); 947 948 if (!fault) { 948 faultClause = " \nAND (pstampJob.fault < 10)";949 psStringAppend(&faultClause, " \nAND (pstampJob.fault < %d)", PSTAMP_FIRST_ERROR_CODE); 949 950 } 950 951 … … 963 964 964 965 if (!p_psDBRunQueryF(config->dbh, query, faultClause)) { 965 psError(PS_ERR_UNKNOWN, false, "database error"); 966 return false; 967 } 966 psFree(faultClause); 967 psFree(query); 968 psError(PS_ERR_UNKNOWN, false, "database error"); 969 return false; 970 } 971 972 psFree(faultClause); 968 973 969 974 return true; … … 1322 1327 return false; 1323 1328 } 1329 1330 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 1331 1324 1332 psString query = pxDataGet("pstamptool_revertdependent.sql"); 1325 1333 if (!query) { … … 1333 1341 psFree(where); 1334 1342 1343 if (!fault) { 1344 // unless asked to clear a specific fault value, restrict reverts to fault codes 1345 // that are less than the minimum fault in the API 1346 psStringAppend(&query, " AND (pstampDependent.fault < %d)", PSTAMP_FIRST_ERROR_CODE); 1347 } 1348 1335 1349 if (!p_psDBRunQuery(config->dbh, query)) { 1336 1350 psError(PS_ERR_UNKNOWN, false, "database error");
Note:
See TracChangeset
for help on using the changeset viewer.
