VOL-1181 Add an extra OLT indication when Voltha reconnects
Change-Id: Ia47cc4c0a5cc4f8c47578876f354dff9a6d43673
diff --git a/common/server.cc b/common/server.cc
index 54d32ac..b37e6dc 100644
--- a/common/server.cc
+++ b/common/server.cc
@@ -155,6 +155,22 @@
std::cout << "Connection to Voltha established. Indications enabled"
<< std::endl;
+ if (state.previsouly_connected()) {
+ // Reconciliation / recovery case
+ if (state.is_activated()){
+ // Adding extra olt indication of current state
+ openolt::Indication ind;
+ openolt::OltIndication* oltInd = new openolt::OltIndication();
+ if (state.is_activated()) {
+ oltInd->set_oper_state("up");
+ } else {
+ oltInd->set_oper_state("down");
+ }
+ ind.set_allocated_olt_ind(oltInd);
+ oltIndQ.push(ind);
+ }
+ }
+
state.connect();
while (state.is_connected()) {