IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 6, 2012, 12:46:12 PM (14 years ago)
Author:
bills
Message:

accept -set_quality in difftool -updatediffskyfile

File:
1 edited

Legend:

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

    r34766 r34770  
    27422742    PS_ASSERT_PTR_NON_NULL(config, false);
    27432743
    2744     PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false);
    2745     PXOPT_LOOKUP_S16(quality, config->args, "-set_quality", false, false);
    2746 
    2747     psMetadata *where = psMetadataAlloc();
    2748     PXOPT_COPY_S64(config->args, where, "-diff_id",   "diff_id",   "==");
    2749     PXOPT_COPY_STR(config->args, where, "-skycell_id", "skycell_id",   "==");
    2750 
    2751     if (!pxSetFaultCode(config->dbh, "diffSkyfile", where, fault, quality)) {
    2752         psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
     2744    PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
     2745
     2746    if (!state) {
     2747        psMetadata *where = psMetadataAlloc();
     2748        PXOPT_COPY_S64(config->args, where, "-diff_id",   "diff_id",   "==");
     2749        PXOPT_COPY_STR(config->args, where, "-skycell_id", "skycell_id",   "==");
     2750
     2751        PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false);
     2752        PXOPT_LOOKUP_S16(quality, config->args, "-set_quality", false, false);
     2753
     2754        if (!pxSetFaultCode(config->dbh, "diffSkyfile", where, fault, quality)) {
     2755            psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
     2756            psFree (where);
     2757            return false;
     2758        }
    27532759        psFree (where);
    2754         return false;
    2755     }
    2756     psFree (where);
     2760    } else {
     2761      if (strcmp(state,"error_cleaned") == 0) {
     2762        change_skyfile_data_state(config,"error_cleaned", "goto_cleaned");
     2763      }
     2764      else if (strcmp(state, "error_scrubbed") == 0) {
     2765        change_skyfile_data_state(config,"error_scrubbed", "goto_scrubbed");
     2766      }
     2767      else if (strcmp(state, "error_purged") == 0) {
     2768        change_skyfile_data_state(config,"error_purged", "goto_purged");
     2769      }
     2770      else {
     2771        psError(PS_ERR_UNKNOWN, false, "unhandled state given");
     2772        return(false);
     2773      }
     2774    }
    27572775
    27582776    return true;
Note: See TracChangeset for help on using the changeset viewer.