Changeset 27786 for trunk/ippTools/src/magicdstool.c
- Timestamp:
- Apr 27, 2010, 2:46:37 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/magicdstool.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/magicdstool.c
r27745 r27786 572 572 // we can transition by query as well 573 573 574 575 574 psMetadata *where = psMetadataAlloc(); 576 575 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); … … 1225 1224 } 1226 1225 1227 psString stateCheck = NULL;1228 if (!strcmp(state, "goto_cleaned")) {1229 // science cleanup sets runs to goto_cleaned. Don't undo it if already cleaned1230 psStringAppend(&stateCheck, " AND magicDSRun.state != 'cleaned'");1231 }1232 1233 1234 1226 psString query = NULL; 1235 1227 psStringAppend(&query, "UPDATE magicDSRun SET state = '%s' %s\n", state, extraSetStr ? extraSetStr : ""); … … 1241 1233 psFree(whereClause); 1242 1234 } else { 1243 psError(PS_ERR_UNKNOWN, true, "search arugments are required"); 1244 return false; 1245 } 1246 1247 if (stateCheck) { 1248 psStringAppend(&query, stateCheck); 1249 } 1250 psFree(stateCheck); 1235 psError(PS_ERR_UNKNOWN, true, "search arguments are required"); 1236 return false; 1237 } 1238 1239 if (!strcmp(state, "goto_cleaned")) { 1240 // Don't set state back to goto_cleaned if it is already cleaned 1241 psStringAppend(&query, " AND (magicDSRun.state != 'cleaned')"); 1242 1243 // don't clean up magicDSRun's where stage is camera 1244 psStringAppend(&query, " AND (magicDSRun.stage != 'camera')"); 1245 } 1246 1251 1247 if (!p_psDBRunQuery(config->dbh, query)) { 1252 1248 psError(PS_ERR_UNKNOWN, false,
Note:
See TracChangeset
for help on using the changeset viewer.
