IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 15, 2009, 9:33:58 AM (17 years ago)
Author:
bills
Message:

add -clean argument to the exportrun modes. If set switch
state and data state from 'full' to 'cleaned'.
If no rows are found in -exportrun return error status for
the command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/stacktool.c

    r23742 r23873  
    11991199  PXOPT_LOOKUP_S64(det_id, config->args, "-stack_id", true,  false);
    12001200  PXOPT_LOOKUP_STR(outfile, config->args, "-outfile", true,  false);
     1201  PXOPT_LOOKUP_BOOL(clean, config->args, "-clean", false);
    12011202  PXOPT_LOOKUP_U64(limit,   config->args, "-limit",   false, false);
    12021203
     
    12491250    }
    12501251    if (!psArrayLength(output)) {
    1251       psTrace("regtool", PS_LOG_INFO, "no rows found");
     1252      psError(PS_ERR_UNKNOWN, true, "no rows found");
    12521253      psFree(output);
    1253       return true;
    1254     }
     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
    12551267      // we must write the export table in non-simple (true) format
    12561268    if (!ippdbPrintMetadatas(f, output, tables[i].tableName, true)) {
Note: See TracChangeset for help on using the changeset viewer.