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

Function handle_internal_msg

modules/clusterer/clusterer.c:1040–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1038}
1039
1040static void handle_internal_msg(bin_packet_t *received, int packet_type,
1041 node_info_t *src_node, struct timeval rcv_time, int *ev_actions_required)
1042{
1043 switch (packet_type) {
1044 case CLUSTERER_PONG:
1045 LM_DBG("Received ping reply from node [%d]\n", src_node->node_id);
1046 handle_pong(received, src_node, rcv_time, ev_actions_required);
1047 break;
1048 case CLUSTERER_PING:
1049 handle_ping(received, src_node, rcv_time, ev_actions_required);
1050 break;
1051 case CLUSTERER_LS_UPDATE:
1052 handle_ls_update(received, src_node, ev_actions_required);
1053 break;
1054 case CLUSTERER_FULL_TOP_UPDATE:
1055 LM_DBG("Received full topology update with source [%d]\n", src_node->node_id);
1056 handle_full_top_update(received, src_node, ev_actions_required);
1057 break;
1058 case CLUSTERER_UNKNOWN_ID:
1059 LM_DBG("Received UNKNOWN_ID from node [%d]\n", src_node->node_id);
1060 handle_unknown_id(src_node);
1061 break;
1062 case CLUSTERER_NODE_DESCRIPTION:
1063 LM_DBG("Already got node description for source [%d], drop this message\n",
1064 src_node->node_id);
1065 break;
1066 case CLUSTERER_CAP_UPDATE:
1067 LM_DBG("Received capability update with source [%d]\n", src_node->node_id);
1068 handle_cap_update(received, src_node);
1069 break;
1070 default:
1071 LM_WARN("Invalid clusterer binary packet command [%d] from node: %d\n",
1072 packet_type, src_node->node_id);
1073 }
1074}
1075
1076void handle_cl_gen_msg(bin_packet_t *packet, int cluster_id, int source_id)
1077{

Callers 1

bin_rcv_cl_packetsFunction · 0.85

Calls 6

handle_pongFunction · 0.85
handle_pingFunction · 0.85
handle_ls_updateFunction · 0.85
handle_full_top_updateFunction · 0.85
handle_unknown_idFunction · 0.85
handle_cap_updateFunction · 0.85

Tested by

no test coverage detected