- Timestamp:
- May 26, 2009, 1:59:32 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/stacktool.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/ippTools/src
- Property svn:ignore
-
old new 33 33 pstamptool 34 34 disttool 35 receivetool
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/ippTools/src/stacktool.c
r23352 r24244 617 617 PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "=="); 618 618 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 619 PXOPT_COPY_STR(config->args, where, "-label", "stackRun.label", "==");619 pxAddLabelSearchArgs (config, where, "-label", "stackRun.label", "=="); 620 620 621 621 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 718 718 719 719 // default values 720 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 720 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 721 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 721 722 722 723 if (!psDBTransaction(config->dbh)) { … … 754 755 hostname, 755 756 good_frac, 756 code 757 fault, 758 quality 757 759 )) { 758 760 if (!psDBRollback(config->dbh)) { … … 862 864 PXOPT_COPY_S64(config->args, where, "-stack_id", "stackSumSkyfile.stack_id", "=="); 863 865 PXOPT_COPY_STR(config->args, where, "-label", "stackRun.label", "=="); 864 PXOPT_COPY_S16(config->args, where, "- code", "stackSumSkyfile.fault", "==");866 PXOPT_COPY_S16(config->args, where, "-fault", "stackSumSkyfile.fault", "=="); 865 867 866 868 if (!psDBTransaction(config->dbh)) { … … 989 991 990 992 psMetadata *where = psMetadataAlloc(); 991 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");993 pxAddLabelSearchArgs (config, where, "-label", "stackRun.label", "=="); 992 994 993 995 psString query = pxDataGet("stacktool_pendingcleanuprun.sql"); … … 1053 1055 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 1054 1056 } 1055 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");1057 pxAddLabelSearchArgs (config, where, "-label", "stackRun.label", "=="); 1056 1058 1057 1059 psString query = pxDataGet("stacktool_pendingcleanupskyfile.sql"); … … 1169 1171 PS_ASSERT_PTR_NON_NULL(config, false); 1170 1172 1171 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);1173 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 1172 1174 1173 1175 psMetadata *where = psMetadataAlloc(); 1174 1176 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 1175 1177 1176 if (!pxSetFaultCode(config->dbh, "stackSumSkyfile", where, code)) {1178 if (!pxSetFaultCode(config->dbh, "stackSumSkyfile", where, fault)) { 1177 1179 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 1178 1180 psFree (where); … … 1192 1194 1193 1195 int numExportTables = 3; 1194 1196 1195 1197 PS_ASSERT_PTR_NON_NULL(config, NULL); 1196 1198 1197 1199 PXOPT_LOOKUP_S64(det_id, config->args, "-stack_id", true, false); 1198 1200 PXOPT_LOOKUP_STR(outfile, config->args, "-outfile", true, false); 1201 PXOPT_LOOKUP_BOOL(clean, config->args, "-clean", false); 1199 1202 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 1200 1203 … … 1247 1250 } 1248 1251 if (!psArrayLength(output)) { 1249 ps Trace("regtool", PS_LOG_INFO, "no rows found");1252 psError(PS_ERR_UNKNOWN, true, "no rows found"); 1250 1253 psFree(output); 1251 return true; 1252 } 1254 return false; 1255 } 1256 1257 if (clean) { 1258 if (!strcmp(tables[i].tableName, "stackRun")) { 1259 if (!pxSetStateCleaned("stackRun", "state", output)) { 1260 psFree(output); 1261 psError(PS_ERR_UNKNOWN, false, "pxSetStateClean failed for table %s", tables[i].tableName); 1262 return false; 1263 } 1264 } 1265 } 1266 1267 // we must write the export table in non-simple (true) format 1268 if (!ippdbPrintMetadatas(f, output, tables[i].tableName, true)) { 1269 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 1270 psFree(output); 1271 return false; 1272 } 1273 1253 1274 psFree(output); 1254 1275 } … … 1262 1283 { 1263 1284 unsigned int nFail; 1264 1285 1265 1286 int numImportTables = 2; 1266 1287 1267 1288 char tables[2] [80] = {"stackInputSkyfile", "stackSumSkyfile"}; 1268 1289 1269 1290 PS_ASSERT_PTR_NON_NULL(config, NULL); 1270 1291 1271 1292 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1272 1293 … … 1293 1314 psAssert (item, "entry not in input?"); 1294 1315 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1295 1316 1296 1317 switch (i) { 1297 1318 case 0: … … 1307 1328 } 1308 1329 break; 1309 1330 1310 1331 case 1: 1311 1332 for (int i = 0; i < item->data.list->n; i++) { … … 1322 1343 } 1323 1344 } 1324 1345 1325 1346 return true; 1326 1347 }
Note:
See TracChangeset
for help on using the changeset viewer.
