MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / add_node

Function add_node

modules/clusterer/topology.c:705–723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705static node_info_t *add_node(bin_packet_t *received, cluster_info_t *cl,
706 int src_node_id, str *str_vals, int *int_vals)
707{
708 node_info_t *new_node = NULL;
709
710 str_vals[STR_VALS_FLAGS_COL].s = 0;
711 str_vals[STR_VALS_DESCRIPTION_COL].s = 0;
712 int_vals[INT_VALS_ID_COL] = -1; /* no DB id */
713 int_vals[INT_VALS_CLUSTER_ID_COL] = cl->cluster_id;
714 int_vals[INT_VALS_NODE_ID_COL] = src_node_id;
715 int_vals[INT_VALS_STATE_COL] = 1; /* enabled */
716
717 if (add_node_info(&new_node, &cl, int_vals, str_vals) != 0) {
718 LM_ERR("Unable to add node info to backing list\n");
719 return NULL;
720 }
721
722 return new_node;
723}
724
725int delete_neighbour(node_info_t *from_node, node_info_t *to_delete_n)
726{

Callers 2

handle_full_top_updateFunction · 0.85

Calls 1

add_node_infoFunction · 0.85

Tested by

no test coverage detected