? src/config/libpsmoduleconfig_la-pmConfig.loT
? src/config/pm
? src/config/pmConfigDB.patch
RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psModule/src/config/pmConfig.c,v
retrieving revision 1.5
diff -u -r1.5 pmConfig.c
|
|
|
|
| 423 | 423 | This is currently NULL. |
| 424 | 424 | *****************************************************************************/ |
| 425 | 425 | |
| | 426 | #ifdef OMIT_PSDB |
| | 427 | psDB *pmConfigDB(psMetadata *site) |
| | 428 | { |
| | 429 | psError(PS_ERR_UNKNOWN, true, "pslib was built without psDB support"); |
| | 430 | return NULL; |
| | 431 | } |
| | 432 | #else |
| 426 | 433 | psDB *pmConfigDB( |
| 427 | 434 | psMetadata *site) |
| 428 | 435 | { |
| … |
… |
|
| 434 | 441 | psString dbServer = psMetadataLookupStr(&mdStatus01, site, "DBSERVER"); |
| 435 | 442 | psString dbUsername = psMetadataLookupStr(&mdStatus02, site, "DBUSER"); |
| 436 | 443 | psString dbPassword = psMetadataLookupStr(&mdStatus03, site, "DBPASSWORD"); |
| | 444 | psString dbName = psMetadataLookupStr(&mdStatus01, site, "DBNAME"); |
| | 445 | |
| 437 | 446 | if (!(mdStatus01 & mdStatus02 & mdStatus03)) { |
| 438 | 447 | psLogMsg(__func__, PS_LOG_WARN, "Could not determine database server name, userID, and password from site metadata.\n"); |
| 439 | | return(NULL); |
| | 448 | return NULL; |
| | 449 | } |
| | 450 | |
| | 451 | dbh = psDBInit(dbServer, dbUsername, dbPassword, dbName); |
| | 452 | psFree(dbServer); |
| | 453 | psFree(dbUsername); |
| | 454 | psFree(dbPassword); |
| | 455 | psFree(dbName); |
| | 456 | |
| | 457 | if (!dbh) { |
| | 458 | psError(PS_ERR_UNKNOWN, false, "database connection failed"); |
| 440 | 459 | } |
| 441 | 460 | |
| 442 | | return(psDBInit(dbServer, dbUsername, dbPassword, NULL)); |
| | 461 | return dbh; |
| 443 | 462 | } |
| | 463 | #endif |
RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psModule/src/config/pmConfig.h,v
retrieving revision 1.2
diff -u -r1.2 pmConfig.h
|
|
|
|
| 90 | 90 | * security. (TBD) |
| 91 | 91 | * |
| 92 | 92 | */ |
| | 93 | #ifdef DOMIT_PSDB |
| | 94 | typedef psDB void; |
| | 95 | #endif |
| | 96 | |
| 93 | 97 | psDB *pmConfigDB( |
| 94 | 98 | psMetadata *site |
| 95 | 99 | ); |