bugfix: TSG-14284 SF配置不存在的IP时SCE未发送sf_status
This commit is contained in:
@@ -392,15 +392,14 @@ static void *_health_check_session_foreach(void *arg)
|
||||
is_active = 0;
|
||||
}
|
||||
|
||||
sf_status_update(g_sf_status, node->profile_id, is_active, 0);
|
||||
if (node->is_active != is_active) {
|
||||
node->is_active = is_active;
|
||||
if (node->is_active == 1) {
|
||||
get_mac_by_addr(node->policy.address, node->mac);
|
||||
sf_status_update(g_sf_status, node->profile_id, 1, 0);
|
||||
}
|
||||
else {
|
||||
memset(node->mac, 0, sizeof(node->mac));
|
||||
sf_status_update(g_sf_status, node->profile_id, 0, 0);
|
||||
}
|
||||
}
|
||||
if (sleep_ms > node->policy.interval_ms)
|
||||
|
||||
@@ -154,8 +154,11 @@ void sf_status_update(struct sf_status *handle, int sf_profile_id, int sf_status
|
||||
struct node *temp = NULL;
|
||||
HASH_FIND(hh, handle->htable, &sf_profile_id, sizeof(sf_profile_id), temp);
|
||||
if (temp)
|
||||
{
|
||||
if (temp->sf_status != sf_status)
|
||||
{
|
||||
LOG_DEBUG("%s: update: sf_profile %d status %d success, elem_num %lu", LOG_TAG_SF_STATUS, sf_profile_id, sf_status, handle->htable_elem_count);
|
||||
}
|
||||
temp->sf_profile_id = sf_profile_id;
|
||||
temp->sf_status = sf_status;
|
||||
temp->sf_latency = sf_latency;
|
||||
|
||||
Reference in New Issue
Block a user