Commit 585ae576 authored by Graziano Scalamera's avatar Graziano Scalamera
Browse files

Fix loading property file

parent 08116e28
......@@ -303,8 +303,7 @@ void PLCslu::init_device()
// read data filename
// start_file= "/elettra_log/logs/plcll-srv.labels.txt"; //name of the startup file
vector<string>::iterator iter = data_config.begin();
start_file = ((string)*iter).c_str();
iter++;
start_file = ((string)*iter);
DEBUG_STREAM<<"loading srv config from file: "<< start_file <<endl;
load_cond();
DEBUG_STREAM<<"loaded info from file: "<< start_file <<endl;
......@@ -742,11 +741,11 @@ void PLCslu::read_Alarm_image(Tango::Attribute &attr)
void PLCslu::load_cond(){
fd.open(start_file);
fd.open(start_file.c_str());
char pbuf[50];
if (!fd)
{
DEBUG_STREAM << "PLCslu::load_cond() cannot open file:" << strerror(errno) << endl;
DEBUG_STREAM << "PLCslu::load_cond() cannot open file ("<<start_file<<"):" << strerror(errno) << endl;
}
else
{
......
......@@ -445,7 +445,7 @@ public :
// Here is the end of the automatic code generation part
//-------------------------------------------------------------
ifstream fd; //startup file
const char* start_file;
string start_file;
int new_sd, sock; // socket for data exchange
// string ip_host; // ip host name for tcp/ip
// string srv_host;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment