Changeset 16051
- Timestamp:
- Jan 8, 2008, 4:39:55 PM (18 years ago)
- File:
-
- 1 edited
-
branches/end_stage/ippTools/src/regtool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/end_stage/ippTools/src/regtool.c
r16050 r16051 813 813 814 814 bool status = false; 815 // required 815 psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id"); 816 if (!status) { 817 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id"); 818 return false; 819 } 820 if (!exp_id) { 821 psError(PS_ERR_UNKNOWN, true, "-exp_id is required"); 822 return false; 823 } 824 825 bool detrend = psMetadataLookupBool(&status, config->args, "-detrend"); 826 if (!status) { 827 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -detrend"); 828 return false; 829 } 830 831 psString dvodb = psMetadataLookupStr(&status, config->args, "-dvodb"); 832 if (!status) { 833 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -dvodb"); 834 return false; 835 } 836 837 psString tess_id = psMetadataLookupStr(&status, config->args, "-tess_id"); 838 if (!status) { 839 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -tess_id"); 840 return false; 841 } 842 843 psString end_stage = psMetadataLookupStr(&status, config->args, "-end_stage"); 844 if (!status) { 845 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -end_stage"); 846 return false; 847 } 816 848 psString exp_name = psMetadataLookupStr(&status, config->args, "-exp_name"); 817 849 if (!status) { … … 1128 1160 if (!status) { 1129 1161 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -code"); 1130 return false;1131 }1132 psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");1133 if (!status) {1134 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id");1135 return false;1136 }1137 if (!exp_id) {1138 psError(PS_ERR_UNKNOWN, true, "-exp_id is required");1139 return false;1140 }1141 1142 bool detrend = psMetadataLookupBool(&status, config->args, "-detrend");1143 if (!status) {1144 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -detrend");1145 return false;1146 }1147 1148 psString dvodb = psMetadataLookupStr(&status, config->args, "-dvodb");1149 if (!status) {1150 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -dvodb");1151 return false;1152 }1153 1154 psString tess_id = psMetadataLookupStr(&status, config->args, "-tess_id");1155 if (!status) {1156 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -tess_id");1157 return false;1158 }1159 1160 psString end_stage = psMetadataLookupStr(&status, config->args, "-end_stage");1161 if (!status) {1162 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -end_stage");1163 1162 return false; 1164 1163 } … … 1302 1301 } 1303 1302 1304 // if this is a detrend image don't put it in the chip queue (and we're1305 // done)1306 if (detrend) {1307 psFree(newExp);1308 1309 // set the state for the newExp to stop1310 if (!pxnewExpSetState(config, exp_id, "stop")) {1311 // rollback1312 if (!psDBRollback(config->dbh)) {1313 psError(PS_ERR_UNKNOWN, false, "database error");1314 }1315 psError(PS_ERR_UNKNOWN, false, "failed to change newExp.state for exp_id: %s", exp_id);1316 return false;1317 }1318 1319 return true;1320 }1321 1322 1323 1303 // set the state for the newExp to stop 1324 1304 if (!pxnewExpSetState(config, exp_id, "stop")) { … … 1330 1310 psFree(newExp); 1331 1311 return false; 1312 } 1313 1314 // if this is a detrend image don't put it in the chip queue (and we're 1315 // done) 1316 if (detrend) { 1317 psFree(newExp); 1318 return true; 1332 1319 } 1333 1320
Note:
See TracChangeset
for help on using the changeset viewer.
