Changeset 19236


Ignore:
Timestamp:
Oct 17, 2018, 10:54:06 AM (8 months ago)
Author:
tbretz
Message:
Allow for a dummy connection.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Database.h

    r19211 r19236  
    2323    DatabaseName(const std::string &database) : compression(0)
    2424    {
     25        if (database.empty())
     26            return;
     27
    2528        static const boost::regex expr("(([[:word:].-]+)(:(.+))?@)?([[:word:].-]+)(:([[:digit:]]+))?(/([[:word:].-]+))(\\?compress=[01])?");
    2629
     
    7477
    7578        // Connect to the database
    76         connect(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port);
     79        if (!server.empty())
     80            connect(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port);
    7781    }
    7882};
Note: See TracChangeset for help on using the changeset viewer.