Skip to content

Commit

Permalink
Fix $ct and $ct.fields variables.
Browse files Browse the repository at this point in the history
Force parsing of all Contact headers.
Reported by Nick Altmann.

(cherry picked from commit 19d0f60)
  • Loading branch information
bogdan-iancu committed Jun 24, 2015
1 parent 4b8aa79 commit 7728f70
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pvar.c
Expand Up @@ -668,13 +668,8 @@ static int pv_get_contact_body(struct sip_msg *msg, pv_param_t *param,
return -1;

/* get all CONTACT headers */
if(msg->contact==NULL && parse_headers(msg, HDR_EOH_F, 0)==-1)
{
LM_DBG("no contact header\n");
return pv_get_null(msg, param, res);
}

if(!msg->contact || !msg->contact->body.s || msg->contact->body.len<=0)
if(parse_headers(msg, HDR_EOH_F, 0)==-1 || msg->contact==NULL ||
!msg->contact->body.s || msg->contact->body.len<=0)
{
LM_DBG("no contact header!\n");
return pv_get_null(msg, param, res);
Expand Down

0 comments on commit 7728f70

Please sign in to comment.