support for sda3016ss
Change-Id: Id86e26e2389455e04173a1568b503d3bd77dac6d
diff --git a/agent/common/core.h b/agent/common/core.h
index 6dba610..2159716 100644
--- a/agent/common/core.h
+++ b/agent/common/core.h
@@ -170,6 +170,7 @@
#define NUM_OF_PRIORITIES 8
#define NUMBER_OF_DEFAULT_INTERFACE_QUEUES 4 // <= NUM_OF_PRIORITIES
#define FILL_ARRAY(ARRAY,START,END,VALUE) for(int i=START;i<END;ARRAY[i++]=VALUE);
+#define FILL_ARRAY2(ARRAY,START,END,VALUE) for(int i=START;i<END;ARRAY[i]=VALUE,i+=2);
#define COUNT_OF(array) (sizeof(array) / sizeof(array[0]))
#define NUMBER_OF_PBITS 8
#define NUMBER_OF_REPLICATED_FLOWS NUMBER_OF_PBITS
diff --git a/agent/common/server.cc b/agent/common/server.cc
index 3199a51..83a66f3 100644
--- a/agent/common/server.cc
+++ b/agent/common/server.cc
@@ -42,6 +42,7 @@
const char *serverPort = "0.0.0.0:9191";
int signature;
+std::unique_ptr<Server> server;
Queue<openolt::Indication> oltIndQ;
@@ -240,6 +241,7 @@
openolt::Empty* response) override {
uint8_t ret = system("shutdown -r now");
+ server->Shutdown();
return Status::OK;
@@ -419,7 +421,7 @@
builder.AddListeningPort(server_address, credentials);
builder.RegisterService(&service);
- std::unique_ptr<Server> server(builder.BuildAndStart());
+ server = builder.BuildAndStart();
time_t now;
time(&now);