| 703 | } |
| 704 | |
| 705 | static 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 | |
| 725 | int delete_neighbour(node_info_t *from_node, node_info_t *to_delete_n) |
| 726 | { |
no test coverage detected