Changeset 18927 for trunk/ippTools/src/pxadmin.c
- Timestamp:
- Aug 5, 2008, 3:13:35 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pxadmin.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pxadmin.c
r18850 r18927 122 122 123 123 { 124 bool status;125 124 char line[128], answer[128]; 126 125 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; 129 132 130 133 fprintf(stdout, "*** delete the tables from database %s? ***\n", dbName); … … 150 153 sscanf(line, "%s", answer); 151 154 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; 153 161 if (strcmp (answer, dbPassword)) { 154 162 psError(PS_ERR_UNKNOWN, true, "invalid passwd - tables NOT deleleted");
Note:
See TracChangeset
for help on using the changeset viewer.
