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

Function ipc_dispatch_sync_reply

modules/clusterer/sync.c:410–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410int ipc_dispatch_sync_reply(cluster_info_t *cluster, int node_id, str *cap_name)
411{
412 struct reply_rpc_params *params;
413
414 params = shm_malloc(sizeof *params + cap_name->len);
415 if (!params) {
416 LM_ERR("oom!\n");
417 return -1;
418 }
419 memset(params, 0, sizeof *params);
420 params->cap_name.s = (char *)(params + 1);
421
422 memcpy(params->cap_name.s, cap_name->s, cap_name->len);
423 params->cap_name.len = cap_name->len;
424 params->node_id = node_id;
425 params->cluster = cluster;
426
427 if (ipc_dispatch_rpc(send_sync_repl, params) < 0) {
428 LM_ERR("Failed to dispatch rpc\n");
429 return -1;
430 }
431
432 return 0;
433}
434
435void handle_sync_request(bin_packet_t *packet, cluster_info_t *cluster,
436 node_info_t *source)

Callers 2

handle_sync_requestFunction · 0.85
do_actions_node_evFunction · 0.85

Calls 2

shm_mallocFunction · 0.85
ipc_dispatch_rpcFunction · 0.85

Tested by

no test coverage detected