Skip to content

Commit

Permalink
Fix raise_node_state_ev parameter order
Browse files Browse the repository at this point in the history
Calls to raise_node_state_ev had the node status and cluster_id parameters reversed.

(cherry picked from commit 6b9d6e8)
  • Loading branch information
kworm83 authored and rvlad-patrascu committed Feb 16, 2021
1 parent 2fdfca8 commit a84d72f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/clusterer/clusterer.c
Expand Up @@ -1401,7 +1401,7 @@ void do_actions_node_ev(cluster_info_t *clusters, int *select_cluster,
if (cap_it->reg.event_cb)
cap_it->reg.event_cb(CLUSTER_NODE_DOWN, node->node_id);

if (raise_node_state_ev(cl->cluster_id, CLUSTER_NODE_DOWN,
if (raise_node_state_ev(CLUSTER_NODE_DOWN, cl->cluster_id,
node->node_id) < 0)
LM_ERR("Failed to raise node state changed event for: "
"cluster_id=%d node_id=%d, new_state=node down\n",
Expand Down Expand Up @@ -1466,7 +1466,7 @@ void do_actions_node_ev(cluster_info_t *clusters, int *select_cluster,
cap_it->reg.event_cb(CLUSTER_NODE_UP, node->node_id);
}

if (raise_node_state_ev(cl->cluster_id, CLUSTER_NODE_UP,
if (raise_node_state_ev(CLUSTER_NODE_UP, cl->cluster_id,
node->node_id) < 0)
LM_ERR("Failed to raise node state changed event for: "
"cluster_id=%d node_id=%d, new_state=node up\n",
Expand Down

0 comments on commit a84d72f

Please sign in to comment.