* Function that runs a JSON-RPC notification * Returns: * -1: internal error * -2: communication error * 1: success */
| 404 | * 1: success |
| 405 | */ |
| 406 | static 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 |
nothing calls this directly
no test coverage detected