Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
cn5g
oai-cn5g-smf
Commits
3362058a
Commit
3362058a
authored
May 22, 2019
by
gauthier
Browse files
function to send heartbeat to tasks
parent
047abd75
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/oai_spgwc/main.cpp
View file @
3362058a
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment