IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17940 for trunk/psModules


Ignore:
Timestamp:
Jun 5, 2008, 11:39:25 AM (18 years ago)
Author:
Paul Price
Message:

Don't attempt to set up a database connection if the server is "XXX" or "NONE".

File:
1 edited

Legend:

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

    r17874 r17940  
    880880    }
    881881
    882     if (!config->database) {
    883         psDB *dbh = pmConfigDB(config); // Database handle
    884         if (!dbh) {
    885             psError(PS_ERR_UNKNOWN, false, "Unable to open database connection.");
    886             psFree(config);
    887             return NULL;
    888         }
    889         config->database = dbh;
     882    if (!(config->database = pmConfigDB(config))) {
     883        psWarning("Unable to open database connection.");
    890884    }
    891885
     
    11951189    }
    11961190
     1191    if (strcasecmp(dbServer, "XXX") == 0 || strcasecmp(dbServer, "NONE") == 0) {
     1192        psTrace("psModules.config", 1, "Database initialisation skipped: server is %s.", dbServer);
     1193        return NULL;
     1194    }
     1195
    11971196    return psDBInit(dbServer, dbUsername, dbPassword, dbName, dbPort);
    11981197    #endif
Note: See TracChangeset for help on using the changeset viewer.