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

Function free_faked_req

modules/tm/t_msgbuilder.h:345–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343
344
345inline static void free_faked_req(struct sip_msg *faked_req, struct cell *t)
346{
347 if (faked_req->new_uri.s) {
348 pkg_free(faked_req->new_uri.s);
349 faked_req->new_uri.s = NULL;
350 }
351 if (faked_req->dst_uri.s) {
352 pkg_free(faked_req->dst_uri.s);
353 faked_req->dst_uri.s = NULL;
354 }
355 if (faked_req->path_vec.s) {
356 pkg_free(faked_req->path_vec.s);
357 faked_req->path_vec.s = NULL;
358 }
359 if (faked_req->set_global_address.s) {
360 pkg_free(faked_req->set_global_address.s);
361 faked_req->set_global_address.s = NULL;
362 }
363 if (faked_req->set_global_port.s) {
364 pkg_free(faked_req->set_global_port.s);
365 faked_req->set_global_port.s = NULL;
366 }
367
368 /* clean the pkg copy of the body */
369 if (faked_req->body) {
370 free_sip_body(faked_req->body);
371 faked_req->body = NULL;
372 }
373
374 if (faked_req->msg_cb) {
375 msg_callback_process(faked_req, MSG_DESTROY, NULL);
376 }
377
378 /* free all types of lump that were added in failure handlers */
379 del_notflaged_lumps( &(faked_req->add_rm), LUMPFLAG_SHMEM );
380 del_notflaged_lumps( &(faked_req->body_lumps), LUMPFLAG_SHMEM );
381 del_nonshm_lump_rpl( &(faked_req->reply_lump) );
382
383 if (faked_req->add_rm && faked_req->add_rm != t->uas.request->add_rm)
384 shm_free(faked_req->add_rm);
385 if (faked_req->body_lumps
386 && faked_req->body_lumps != t->uas.request->body_lumps)
387 shm_free(faked_req->body_lumps);
388 if (faked_req->reply_lump
389 && faked_req->reply_lump != t->uas.request->reply_lump)
390 shm_free(faked_req->reply_lump);
391
392 clean_msg_clone( faked_req, t->uas.request, t->uas.end_request);
393
394 /* remove the headers' list */
395 if (faked_req->headers) {
396 pkg_free(faked_req->headers);
397 faked_req->headers = 0;
398 }
399}
400
401
402#endif

Callers 4

run_failure_handlersFunction · 0.85
do_dns_failoverFunction · 0.85
t_resume_async_requestFunction · 0.85
t_inject_branchFunction · 0.85

Calls 6

free_sip_bodyFunction · 0.85
msg_callback_processFunction · 0.85
del_notflaged_lumpsFunction · 0.85
del_nonshm_lump_rplFunction · 0.85
shm_freeFunction · 0.85
clean_msg_cloneFunction · 0.85

Tested by

no test coverage detected