Commit b8523d33 authored by Niuhaiwen's avatar Niuhaiwen

add heart-beat notify

parent 4427835b
......@@ -608,15 +608,24 @@ void nrf_profile::handle_heartbeart_timeout_nfupdate(uint64_t ms) {
"current "
"ms %ld",
nf_instance_id.c_str(), ms, current_ms);
Logger::nrf_app().info("nf_status %s",nf_status.c_str());
std::shared_ptr<nrf_profile> profile = {};
std::string status;
nrf_app_inst->find_nf_profile(nf_instance_id, profile);
profile->get_nf_status(status);
Logger::nrf_app().info("profile nf_status %s",status.c_str());
if (!is_updated) {
set_nf_status("SUSPENDED");
find_nf_profile(nf_instance_id, profile);
//set_nf_status("SUSPENDED");
if(status.compare("REGISTERED") == 0)
{
//nrf_app_inst->find_nf_profile(nf_instance_id, profile);
std::vector<std::string> notification_uris = {};
nrf_app_inst->get_subscription_list(
nf_instance_id, NOTIFICATION_TYPE_NF_DEREGISTERED, notification_uris);
nrf_client_inst->notify_subscribed_event(
profile, NOTIFICATION_TYPE_NF_DEREGISTERED, notification_uris);
}
set_nf_status("SUSPENDED");
}
set_status_updated(false);
}
......
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