IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 22, 2008, 10:21:52 AM (18 years ago)
Author:
eugene
Message:

using new user/site/system construction for config files

File:
1 edited

Legend:

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

    r12696 r16611  
    1212{
    1313    PS_ASSERT_PTR_NON_NULL(command, false);
     14    PS_ASSERT_PTR_NON_NULL(config, false);
     15    PS_ASSERT_PTR_NON_NULL(config->complete, false);
    1416
    1517    bool mdok;                          // Status of MD lookup
    16     const char *dbserver = psMetadataLookupStr(&mdok, config->site, "DBSERVER"); // Database server
     18    const char *dbserver = psMetadataLookupStr(&mdok, config->complete, "DBSERVER"); // Database server
    1719    if (!mdok || strlen(dbserver) == 0) {
    1820        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find DBSERVER in site configuration.\n");
    19         return NULL;
     21        return false;
    2022    }
    21     const char *dbname = psMetadataLookupStr(&mdok, config->site, "DBNAME"); // Database name
     23    const char *dbname = psMetadataLookupStr(&mdok, config->complete, "DBNAME"); // Database name
    2224    if (!mdok || strlen(dbname) == 0) {
    2325        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find DBNAME in site configuration.\n");
    24         return NULL;
     26        return false;
    2527    }
    26     const char *dbuser = psMetadataLookupStr(&mdok, config->site, "DBUSER"); // Database user
     28    const char *dbuser = psMetadataLookupStr(&mdok, config->complete, "DBUSER"); // Database user
    2729    if (!mdok || strlen(dbuser) == 0) {
    2830        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find DBUSER in site configuration.\n");
    29         return NULL;
     31        return false;
    3032    }
    31     const char *dbpassword = psMetadataLookupStr(&mdok, config->site, "DBPASSWORD"); // Database password
     33    const char *dbpassword = psMetadataLookupStr(&mdok, config->complete, "DBPASSWORD"); // Database password
    3234    if (!mdok || strlen(dbpassword) == 0) {
    3335        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find DBPASSWORD in site configuration.\n");
    34         return NULL;
     36        return false;
    3537    }
    3638
Note: See TracChangeset for help on using the changeset viewer.