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

Function dm_dispatch_event_req

modules/aaa_diameter/dm_evi.c:95–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94
95int dm_dispatch_event_req(struct msg *msg, const str *sessid, int app_id,
96 int cmd_code, const str *avps_json)
97{
98 dm_ipc_event_req *job;
99
100 job = shm_malloc(sizeof *job);
101 if (!job)
102 goto out_oom;
103 memset(job, 0, sizeof *job);
104
105 job->fd_msg = msg;
106 job->app_id = app_id;
107 job->cmd_code = cmd_code;
108
109 if (shm_nt_str_dup(&job->sessid, sessid)
110 || shm_nt_str_dup(&job->avps_json, avps_json))
111 goto out_oom;
112
113 return ipc_dispatch_job(dmev_req_ipc, job);
114
115out_oom:
116 if (job) {
117 shm_free(job->sessid.s);
118 shm_free(job->avps_json.s);
119 shm_free(job);
120 }
121 LM_ERR("oom\n");
122 return -1;
123}
124
125
126/**

Callers 1

dm_receive_reqFunction · 0.85

Calls 4

shm_mallocFunction · 0.85
shm_nt_str_dupFunction · 0.85
ipc_dispatch_jobFunction · 0.85
shm_freeFunction · 0.85

Tested by

no test coverage detected