- Timestamp:
- 03/22/12 11:14:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/drivectrl.cc
r13165 r13166 879 879 int Track(const EventImp &evt) 880 880 { 881 if (evt.GetSize()<=1 7)881 if (evt.GetSize()<=16) 882 882 { 883 883 ostringstream msg; … … 887 887 } 888 888 889 if (evt.Get<char>(evt.GetSize()-1)!='\0') 890 T::Warn("Track - It seems that the string is not zero-terminated."); 891 892 const double *dat = evt.Ptr<double>(); 893 const string name = evt.Ptr<char>(16); 889 const double *dat = evt.Ptr<double>(); 890 const char *ptr = evt.Ptr<char>(16); 891 const char *last = ptr+evt.GetSize()-16; 892 893 if (find(ptr, last, '\0')==last) 894 { 895 T::Fatal("Track - The name transmitted by dim is not null-terminated."); 896 return false; 897 } 898 899 const string name(ptr); 894 900 895 901 const sources::const_iterator it = fSources.find(name); 896 902 if (it==fSources.end()) 897 return T::Error("Source '"+name+"' not found in list."); 903 { 904 T::Error("Source '"+name+"' not found in list."); 905 return false; 906 } 898 907 899 908 const double &ra = it->second.first; … … 1208 1217 int EvalOptions(Configuration &conf) 1209 1218 { 1210 SetEndpoint(conf.Get<string>("addr"));1211 1212 1219 fDrive.SetVerbose(!conf.Get<bool>("quiet")); 1213 1220 … … 1249 1256 if (conf.Has("source-database")) 1250 1257 ReadDatabase(conf.Get<string>("source-database")); 1258 1259 // The possibility to connect should be last, so that 1260 // everything else is already initialized. 1261 SetEndpoint(conf.Get<string>("addr")); 1251 1262 1252 1263 return -1;
Note:
See TracChangeset
for help on using the changeset viewer.