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

Function mi_script_async_job

modules/mi_script/mi_script.c:601–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601static void mi_script_async_job(mi_response_t *resp, struct mi_script_async_job *job)
602{
603 str msg;
604 char *res = NULL;
605 int release;
606
607 /* we got a response - handle it */
608 job->rc = mi_script_handle_response(resp, (job->ret?&res:NULL), &release);
609 if (job->ret && res) {
610 init_str(&msg, res);
611 shm_str_dup(&job->msg, &msg);
612 }
613
614 if (release)
615 cJSON_PurgeString(res);
616
617 if (ipc_send_rpc(job->process_no, mi_script_async_resume_job, job) < 0) {
618 LM_ERR("could not resume async MI command!\n");
619 mi_script_async_job_free(job);
620 }
621}
622
623static void mi_script_notify_async_job(mi_response_t *resp,
624 struct mi_handler *hdl, int done)

Callers 2

Calls 5

init_strFunction · 0.85
cJSON_PurgeStringFunction · 0.85
ipc_send_rpcFunction · 0.85
mi_script_async_job_freeFunction · 0.85

Tested by

no test coverage detected