| 806 | } |
| 807 | |
| 808 | enum clusterer_send_ret bcast_remove_node(int cluster_id, int target_node) |
| 809 | { |
| 810 | bin_packet_t packet; |
| 811 | int rc; |
| 812 | |
| 813 | if (bin_init(&packet, &cl_extra_cap, CLUSTERER_REMOVE_NODE, |
| 814 | BIN_VERSION, 0) < 0) { |
| 815 | LM_ERR("Failed to init bin send buffer\n"); |
| 816 | return CLUSTERER_SEND_ERR; |
| 817 | } |
| 818 | |
| 819 | if (bin_push_int(&packet, target_node) < 0) |
| 820 | return CLUSTERER_SEND_ERR; |
| 821 | |
| 822 | if (msg_add_trailer(&packet, cluster_id, -1) < 0) { |
| 823 | LM_ERR("Failed to add trailer to module's message\n"); |
| 824 | return CLUSTERER_SEND_ERR; |
| 825 | } |
| 826 | |
| 827 | rc = clusterer_bcast_msg(&packet, cluster_id, NODE_CMP_ANY, 0); |
| 828 | |
| 829 | bin_free_packet(&packet); |
| 830 | |
| 831 | return rc; |
| 832 | } |
| 833 | |
| 834 | static inline int su_ip_cmp(union sockaddr_union* s1, union sockaddr_union* s2) |
| 835 | { |
no test coverage detected