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

Function rtpe_function_call_process

modules/rtpengine/rtpengine.c:3461–3480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3459}
3460
3461static bencode_item_t *rtpe_function_call_process(bencode_buffer_t *bencbuf, char* cp, int ret)
3462{
3463 bencode_item_t *resp;
3464 str error;
3465
3466 resp = bencode_decode_expect(bencbuf, cp, ret, BENCODE_DICTIONARY);
3467 if (!resp) {
3468 LM_ERR("failed to decode bencoded reply from proxy: %.*s\n", ret, cp);
3469 return NULL;
3470 }
3471 if (!bencode_dictionary_get_strcmp(resp, "result", "error")) {
3472 if (!bencode_dictionary_get_str(resp, "error-reason", &error))
3473 LM_ERR("proxy return error but didn't give an error reason: %.*s\n", ret, cp);
3474 else
3475 LM_ERR("proxy replied with error: %.*s\n", error.len, error.s);
3476 return NULL;
3477 }
3478
3479 return resp;
3480}
3481
3482enum async_ret_code resume_async_send_rtpe_command(int fd, struct sip_msg *msg, void *_param)
3483{

Callers 1

Calls 3

bencode_decode_expectFunction · 0.85

Tested by

no test coverage detected