IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14974


Ignore:
Timestamp:
Sep 21, 2007, 12:11:37 PM (19 years ago)
Author:
Paul Price
Message:

Realised we don't want to keep The Copy of FILERULES in the site
configuration --- the site configuration is something the user
shouldn't have to touch very often.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_070920/psModules/src/camera/pmFPAfileDefine.c

    r14973 r14974  
    3232    assert(config->site);
    3333
    34     const char *setName = psMetadataLookupStr(NULL, camera, "FILERULES"); // Name of file rules set
    35     if (!setName) {
     34    psMetadataItem *item = psMetadataLookup(camera, "FILERULES"); // Item with the file rule of interest
     35    if (!item) {
    3636        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find FILERULES in the camera configuration.");
    37         return NULL;
    38     }
    39 
    40     psMetadata *fileruleSets = psMetadataLookupMetadata(NULL, config->site,
    41                                                         "FILERULES"); // Sets of defined file rules
    42     if (!fileruleSets) {
    43         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find FILERULES in the site configuration.");
    44         return NULL;
    45     }
    46 
    47     psMetadataItem *item = psMetadataLookup(fileruleSets, setName); // Item with the file rule of interest
    48     if (!item) {
    49         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find FILERULES set %s in the SITE configuration.",
    50                 setName);
    5137        return NULL;
    5238    }
     
    6147          // It's the name of a file --- read the file, and store it for future use
    6248          if (!pmConfigFileRead(&filerules, item->data.str, "filerules")) {
    63               psError(PM_ERR_CONFIG, false, "Trouble reading reading file rules %s --- "
    64                       "ignored.\n", setName);
     49              psError(PM_ERR_CONFIG, false, "Trouble reading reading file rules from %s --- "
     50                      "ignored.\n", item->data.str);
    6551              psFree(filerules);
    6652              return NULL;
Note: See TracChangeset for help on using the changeset viewer.