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

Function jrpc_notify

modules/jsonrpc/jsonrpc.c:406–422  ·  view source on GitHub ↗

* Function that runs a JSON-RPC notification * Returns: * -1: internal error * -2: communication error * 1: success */

Source from the content-addressed store, hash-verified

404 * 1: success
405 */
406static int jrpc_notify(struct sip_msg *msg, union sockaddr_union *dst,
407 str *method, str *params)
408{
409 int ret;
410 char *cmd;
411
412 cmd = jsonrpc_build_cmd(method, params, NULL);
413 if (!cmd) {
414 LM_ERR("cannot build jsonrpc command\n");
415 return -1;
416 }
417
418 ret = jsonrpc_handle_cmd(dst, cmd, NULL, NULL);
419 if (ret < 0)
420 LM_ERR("communication error with %s:%hu", JSONRPC_PRINT(dst));
421 return ret;
422}
423
424/**
425 * Function that runs a JSON-RPC request

Callers

nothing calls this directly

Calls 2

jsonrpc_build_cmdFunction · 0.85
jsonrpc_handle_cmdFunction · 0.85

Tested by

no test coverage detected