Commit 3362058a authored by gauthier's avatar gauthier

function to send heartbeat to tasks

parent 047abd75
......@@ -45,8 +45,22 @@ sgwc_app *sgwc_app_inst = nullptr;
pgw_config pgw_cfg;
sgwc_config sgwc_cfg;
void send_heartbeat_to_tasks(const uint32_t sequence);
//------------------------------------------------------------------------------
void my_app_signal_handler(int s){
void send_heartbeat_to_tasks(const uint32_t sequence)
{
itti_msg_ping *itti_msg = new itti_msg_ping(TASK_SGWC_APP, TASK_ALL, sequence);
std::shared_ptr<itti_msg_ping> i = std::shared_ptr<itti_msg_ping>(itti_msg);
int ret = itti_inst->send_broadcast_msg(i);
if (RETURNok != ret) {
Logger::sgwc_app().error( "Could not send ITTI message %s to task TASK_ALL", i->get_msg_name());
}
}
//------------------------------------------------------------------------------
void my_app_signal_handler(int s)
{
std::cout << "Caught signal " << s << std::endl;
Logger::system().startup( "exiting" );
itti_inst->send_terminate_msg(TASK_SGWC_APP);
......
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