Changeset 11255 for trunk/FACT++/src
- Timestamp:
- 07/05/11 11:05:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/scheduler.cc
r11254 r11255 176 176 T::Message(str); 177 177 178 static const boost::regex expr("( ([[:word:].-]+)(:(.+))?@)?([[:word:].-]+)(:([[:digit:]]+))?(/([[:word:].-]+))");178 static const boost::regex expr("([[:word:].-]+):(.+)@([[:word:].-]+)(:([[:digit:]]+))?/([[:word:].-]+)"); 179 179 // 2: user 180 180 // 4: pass … … 192 192 } 193 193 194 if (what.size()!= 10)194 if (what.size()!=7) 195 195 { 196 196 ostringstream msg; … … 200 200 } 201 201 202 const string user = what[ 2];203 const string passwd = what[ 4];204 const string server = what[ 5];205 const string db = fDBName.empty() ? what[ 9] : fDBName;206 const int port = atoi(string(what[ 7]).c_str());202 const string user = what[1]; 203 const string passwd = what[2]; 204 const string server = what[3]; 205 const string db = fDBName.empty() ? what[6] : fDBName; 206 const int port = atoi(string(what[5]).c_str()); 207 207 208 208 ostringstream dbnamemsg; 209 dbnamemsg << "Scheduling started -> using database " << fDBName<< ".";209 dbnamemsg << "Scheduling started -> using database " << db << "."; 210 210 T::Message(dbnamemsg); 211 211 … … 831 831 ->required() 832 832 #endif 833 , "Database link as in\n\t [user:[password]@][server][:port][/database]\nOverwrites options from the default configuration file.")833 , "Database link as in\n\tuser:password@server[:port]/database\nOverwrites options from the default configuration file.") 834 834 ("schedule", var<string>(), "") 835 835 ("mintime", var<int>(), "minimum observation time")
Note:
See TracChangeset
for help on using the changeset viewer.