Skip to content

Commit

Permalink
Clone in shm requests with all headers parsed.
Browse files Browse the repository at this point in the history
For the UAC transactions, when adding the fake msg in the UAS side, be sure all the needed headers are parsed and ready for cloning into SHM.

Reported by Nick Altmann. Also many thanks for the support with the troubleshooting.

(cherry picked from commit 5669370)
  • Loading branch information
bogdan-iancu committed May 14, 2014
1 parent b252b47 commit a4eb40a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/tm/t_msgbuilder.h
Expand Up @@ -92,6 +92,20 @@ static inline struct sip_msg* buf_to_sip_msg(char *buf, unsigned int len,
LM_CRIT("BUG - buffer parsing failed!");
return NULL;
}
/* parse all headers, to be sure they get cloned in shm */
if (parse_headers(&req, HDR_EOH_F, 0 )<0) {
LM_ERR("parse_headers failed\n");
free_sip_msg(&req);
return NULL;
}
/* check if we have all necessary headers */
if (check_transaction_quadruple(&req)==0) {
LM_ERR("too few headers\n");
free_sip_msg(&req);
/* stop processing */
return NULL;
}

/* populate some special fields in sip_msg */
req.force_send_socket = dialog->send_sock;
if (set_dst_uri(&req, dialog->hooks.next_hop)) {
Expand Down

0 comments on commit a4eb40a

Please sign in to comment.