IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2008, 5:45:56 PM (18 years ago)
Author:
Paul Price
Message:

Removing use of pmConfig.complete in favour of proper use of what's now called pmConfigFileIngest (used to be metadataItemReadFile). The idea is that configuration files are read in to the metadata item where they are defined. The result is that the .ipprc (pmConfig.user) can be dumped to a file, and will contain all the other stuff as well, so that it can be loaded in (using '-ipprc XXX' on the command-line) and we have a fully defined configuration without having to load anything else (which may have changed). The problem with pmConfig.complete was that it produced multiple unsynchronised versions: you could access and change data in pmConfig.complete without pmConfig.user or pmConfig.system being updated. This check in restores things to the way they used to be, where everything is synchronised.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfigCommand.c

    r16611 r18908  
    1313    PS_ASSERT_PTR_NON_NULL(command, false);
    1414    PS_ASSERT_PTR_NON_NULL(config, false);
    15     PS_ASSERT_PTR_NON_NULL(config->complete, false);
     15    PS_ASSERT_PTR_NON_NULL(config->user, false);
    1616
    1717    bool mdok;                          // Status of MD lookup
    18     const char *dbserver = psMetadataLookupStr(&mdok, config->complete, "DBSERVER"); // Database server
     18    const char *dbserver = psMetadataLookupStr(&mdok, config->user, "DBSERVER"); // Database server
    1919    if (!mdok || strlen(dbserver) == 0) {
    2020        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find DBSERVER in site configuration.\n");
    2121        return false;
    2222    }
    23     const char *dbname = psMetadataLookupStr(&mdok, config->complete, "DBNAME"); // Database name
     23    const char *dbname = psMetadataLookupStr(&mdok, config->user, "DBNAME"); // Database name
    2424    if (!mdok || strlen(dbname) == 0) {
    2525        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find DBNAME in site configuration.\n");
    2626        return false;
    2727    }
    28     const char *dbuser = psMetadataLookupStr(&mdok, config->complete, "DBUSER"); // Database user
     28    const char *dbuser = psMetadataLookupStr(&mdok, config->user, "DBUSER"); // Database user
    2929    if (!mdok || strlen(dbuser) == 0) {
    3030        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find DBUSER in site configuration.\n");
    3131        return false;
    3232    }
    33     const char *dbpassword = psMetadataLookupStr(&mdok, config->complete, "DBPASSWORD"); // Database password
     33    const char *dbpassword = psMetadataLookupStr(&mdok, config->user, "DBPASSWORD"); // Database password
    3434    if (!mdok || strlen(dbpassword) == 0) {
    3535        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find DBPASSWORD in site configuration.\n");
Note: See TracChangeset for help on using the changeset viewer.