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

Function clean_msg_clone

modules/tm/sip_msg.h:89–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87
88
89static inline void clean_msg_clone(struct sip_msg *msg,void *min, void *max)
90{
91 struct hdr_field *hdr;
92
93 /* free header's parsed structures that were added in pkg mem */
94 for( hdr=msg->headers ; hdr ; hdr=hdr->next ) {
95 if ( hdr->parsed && hdr_allocs_parse(hdr) &&
96 (hdr->parsed<min || hdr->parsed>=max)) {
97 /* header parsed filed doesn't point inside uas.request memory
98 * chunk -> it was added by failure funcs.-> free it as pkg */
99 LM_DBG("removing hdr->parsed %d\n", hdr->type);
100 clean_hdr_field(hdr);
101 hdr->parsed = 0;
102 }
103 }
104}
105
106
107int update_cloned_msg_from_msg(struct sip_msg *c_msg, struct sip_msg *msg);

Callers 4

saveFunction · 0.85
free_faked_reqFunction · 0.85
t_resume_async_replyFunction · 0.85

Calls 2

hdr_allocs_parseFunction · 0.85
clean_hdr_fieldFunction · 0.85

Tested by

no test coverage detected