Commit a40d8b02 authored by Claes Sjofors's avatar Claes Sjofors

sevhistmon: bugfix in node handshake

parent 4a0eedc4
...@@ -399,7 +399,7 @@ int rt_sevhistmon::connect() ...@@ -399,7 +399,7 @@ int rt_sevhistmon::connect()
// Check if this node should be connected // Check if this node should be connected
bool found = false; bool found = false;
for ( unsigned int j = 0; j < m_hs.size(); j++) { for ( unsigned int j = 0; j < m_hs.size(); j++) {
if ( m_hs[i].configerror) if ( m_hs[j].configerror)
continue; continue;
if ( cdh_NoCaseStrcmp( m_nodes[i].name, m_hs[j].nodename) == 0) { if ( cdh_NoCaseStrcmp( m_nodes[i].name, m_hs[j].nodename) == 0) {
found = true; found = true;
...@@ -444,6 +444,7 @@ bool rt_sevhistmon::send_connect( pwr_tNid nid, pwr_tStatus *sts) ...@@ -444,6 +444,7 @@ bool rt_sevhistmon::send_connect( pwr_tNid nid, pwr_tStatus *sts)
return ODD(*sts); return ODD(*sts);
} }
bool rt_sevhistmon::send_server_status_request( pwr_tStatus *sts) bool rt_sevhistmon::send_server_status_request( pwr_tStatus *sts)
{ {
int stime; int stime;
...@@ -627,6 +628,13 @@ int rt_sevhistmon::mainloop() ...@@ -627,6 +628,13 @@ int rt_sevhistmon::mainloop()
m_loopcnt++; m_loopcnt++;
send_data(); send_data();
send_server_status_request( &sts); send_server_status_request( &sts);
if ( !m_allconnected) {
int reconnect_time = int(20.0 / m_scantime);
if ( m_loopcnt % reconnect_time == 0)
retry_connect();
}
continue; continue;
} }
...@@ -679,8 +687,6 @@ int rt_sevhistmon::mainloop() ...@@ -679,8 +687,6 @@ int rt_sevhistmon::mainloop()
qcom_Free( &sts, mp); qcom_Free( &sts, mp);
if ( !m_allconnected)
retry_connect();
} }
} }
......
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