IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 10, 2008, 10:32:59 AM (18 years ago)
Author:
eugene
Message:

updates from current HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080719/ippTools/src/pxadmin.c

    r18923 r19003  
    122122
    123123    {
    124         bool status;
    125124        char line[128], answer[128];
    126125
    127         // XXX use the values defined in config->dbh?
    128         psString dbName = psMetadataLookupStr(&status, config->modules->complete, "DBNAME");
     126        psMetadataItem *name = pmConfigUserSite(config->modules, "DBNAME", PS_DATA_STRING);
     127        if (!name) {
     128            psError(PS_ERR_UNKNOWN, false, "Unable to determine database name.");
     129            return false;
     130        }
     131        psString dbName = name->data.str;
    129132
    130133        fprintf(stdout, "*** delete the tables from database %s? ***\n", dbName);
     
    150153        sscanf(line, "%s", answer);
    151154
    152         psString dbPassword = psMetadataLookupStr(&status, config->modules->complete, "DBPASSWORD");
     155        psMetadataItem *pass = pmConfigUserSite(config->modules, "DBPASSWORD", PS_DATA_STRING);
     156        if (!pass) {
     157            psError(PS_ERR_UNKNOWN, false, "Unable to determine database password.");
     158            return false;
     159        }
     160        psString dbPassword = pass->data.str;
    153161        if (strcmp (answer, dbPassword)) {
    154162            psError(PS_ERR_UNKNOWN, true, "invalid passwd - tables NOT deleleted");
Note: See TracChangeset for help on using the changeset viewer.