IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 20, 2005, 1:06:24 PM (21 years ago)
Author:
gusciora
Message:

....

File:
1 edited

Legend:

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

    r5356 r5435  
    33 *  @author PAP, IfA
    44 *
    5  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2005-10-17 23:37:11 $
     5 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2005-10-20 23:06:24 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    404404    return recipe;
    405405}
     406
     407/******************************************************************************
     408pmConfigDB(*site)
     409 
     410XXX: What should we use for the Database namespace in the call to psDBInit()?
     411This is currently NULL.
     412 *****************************************************************************/
     413
     414psDB *pmConfigDB(
     415    psMetadata *site)
     416{
     417    PS_ASSERT_PTR_NON_NULL(site, NULL);
     418    psBool mdStatus01 = false;
     419    psBool mdStatus02 = false;
     420    psBool mdStatus03 = false;
     421
     422    psString dbServer = psMetadataLookupStr(&mdStatus01, site, "DBSERVER");
     423    psString dbUsername = psMetadataLookupStr(&mdStatus02, site, "DBUSER");
     424    psString dbPassword = psMetadataLookupStr(&mdStatus03, site, "DBPASSWORD");
     425    if (!(mdStatus01 & mdStatus02 & mdStatus03)) {
     426        psLogMsg(__func__, PS_LOG_WARN, "Could not determine database server name, userID, and password from site metadata.\n");
     427        return(NULL);
     428    }
     429
     430    return(psDBInit(dbServer, dbUsername, dbPassword, NULL));
     431}
Note: See TracChangeset for help on using the changeset viewer.