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

Function receive_dr_binary_packet

modules/drouting/dr_clustering.c:256–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256static void receive_dr_binary_packet(bin_packet_t *pkt)
257{
258 int rc = 0;
259
260 LM_DBG("received a binary packet [%d]!\n", pkt->type);
261
262 switch (pkt->type) {
263 case REPL_GW_STATUS_UPDATE:
264 ensure_bin_version(pkt, BIN_VERSION);
265
266 rc = gw_status_update(pkt, 1);
267 break;
268 case REPL_CR_STATUS_UPDATE:
269 ensure_bin_version(pkt, BIN_VERSION);
270
271 rc = cr_status_update(pkt);
272 break;
273 case SYNC_PACKET_TYPE:
274 _ensure_bin_version(pkt, BIN_VERSION, "drouting sync packet");
275
276 dr_recv_sync_packet(pkt);
277 break;
278 default:
279 LM_WARN("Invalid drouting binary packet command: %d "
280 "(from node: %d in cluster: %d)\n",
281 pkt->type, pkt->src_id, dr_cluster_id);
282 }
283
284 if (rc != 0)
285 LM_ERR("failed to process binary packet!\n");
286}
287
288static int dr_recv_sync_request(int node_id)
289{

Callers

nothing calls this directly

Calls 3

gw_status_updateFunction · 0.85
cr_status_updateFunction · 0.85
dr_recv_sync_packetFunction · 0.85

Tested by

no test coverage detected