IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 6, 2011, 10:46:04 AM (15 years ago)
Author:
bills
Message:

integrate changes that were in the production build but not integrated.
Also fix regtool to be compatible with the register.imfile.revert task

File:
1 edited

Legend:

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

    r30203 r30205  
    343343    psMetadata *row = output->data[i];
    344344
     345    bool status = false;
     346    char *tmp_id = psMetadataLookupStr(&status,row,"tmp_class_id");
     347    if (!status) {
     348        // fprintf (stderr, "incomplete on %s\n", psMetadataLookupStr(NULL,row,"exp_name"));
     349        continue;
     350    }
     351
    345352    // Add the information about this row and the previous, if it exists.
    346353    // Write the class_id stuff for debugging.
    347     this_class_id = psStringCopy(psMetadataLookupStr(NULL,row,"tmp_class_id"));
     354    // this_class_id = psStringCopy(psMetadataLookupStr(NULL,row,"tmp_class_id"));
     355    this_class_id = psStringCopy(tmp_id);
     356
    348357    psStringSubstitute(&this_class_id,"XY","ota");
    349358    psMetadataAddStr(row,PS_LIST_TAIL,"this_class_id",PS_META_REPLACE,"",this_class_id);
     359
    350360    if (previous_class_id) {
    351361      psMetadataAddStr(row,PS_LIST_TAIL,"previous_class_id",PS_META_REPLACE,"",previous_class_id);
     
    355365      continue;
    356366    }
     367
     368    if (0 && !strcmp(this_class_id, "XY44")) {
     369        printf("STAT 1: %s (%d %d) %d %d %d\n",
     370               this_class_id,
     371               ok_to_burn, already_burned,
     372               psMetadataLookupS32(NULL,row,"burntool_state"),
     373               psMetadataLookupS32(NULL,row,"is_registered"),
     374               psMetadataLookupS32(NULL,row,"is_downloaded"));
     375    }
     376
    357377    // Determine if we've crossed a class_id boundary, as this resets the bits.
    358378    if (previous_class_id) {
     
    361381        already_burned = true;
    362382        previous_uri = NULL;
     383        // fprintf (stderr, "crossed boundary: %s : %s to %s\n", psMetadataLookupStr(NULL,row,"exp_name"), previous_class_id, this_class_id);
    363384      }
    364385    }
     
    395416        ok_to_burn = false;
    396417        already_burned = false;
     418
     419        // fprintf (stderr, "missing uri: %s %s\n", psMetadataLookupStr(NULL,row,"exp_name"), this_class_id);
    397420
    398421        // Save this round for next round.
     
    405428    }
    406429
    407     // printf("STATUS: %s %s %s %s (%d %d) %d %d %d\n",this_uri,previous_uri,this_class_id,previous_class_id,ok_to_burn,already_burned,psMetadataLookupS32(NULL,row,"burntool_state"),psMetadataLookupS32(NULL,row,"is_registered"),psMetadataLookupS32(NULL,row,"is_downloaded"));
    408 
     430    if (0 && !strcmp(this_class_id, "XY44")) {
     431        printf("STATUS: %s %s %s %s (%d %d) %d %d %d\n",this_uri,previous_uri,this_class_id,previous_class_id,ok_to_burn,already_burned,psMetadataLookupS32(NULL,row,"burntool_state"),psMetadataLookupS32(NULL,row,"is_registered"),psMetadataLookupS32(NULL,row,"is_downloaded"));
     432    }
    409433    // If the state of this imfile is not "pending_burntool" then we can't burn it.
    410434    if (!ignore_state) {
     
    413437      if (!imfile_state) { // imfile state is NULL, so we probably aren't registered.
    414438        ok_to_burn = false;
     439
     440        // fprintf (stderr, "missing imfile_state: %s %s\n", psMetadataLookupStr(NULL,row,"exp_name"), this_class_id);
    415441
    416442        // Save this round for next round.
     
    423449      }
    424450      if (strcmp("pending_burntool",imfile_state) != 0) { // Probably the state is full, do not twiddle states
     451
     452          if (0 && strcmp(imfile_state, "full")) {
     453              fprintf (stderr, "not pending nor full: %s %s %s\n", psMetadataLookupStr(NULL,row,"exp_name"), this_class_id, imfile_state);
     454          }
     455
    425456        // Save this round for next round.
    426457        psFree(previous_class_id);
     
    773804        psStringAppend(&query, " AND %s", whereClause);
    774805        psFree(whereClause);
    775     } else {
    776         psFree(where);
    777         psError(PXTOOLS_ERR_CONFIG, false, "search parameters are required");
    778         return false;
    779806    }
    780807    psFree(where);
Note: See TracChangeset for help on using the changeset viewer.