Skip to content

Commit

Permalink
Fix fetching cseq number for replies.
Browse files Browse the repository at this point in the history
Closes #165.
  • Loading branch information
bogdan-iancu committed Jul 1, 2014
1 parent 5ebc1ef commit acb1b37
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions modules/mediaproxy/mediaproxy.c
Expand Up @@ -448,9 +448,9 @@ get_cseq_number(struct sip_msg *msg, str *cseq)
{
struct cell *trans = tm_api.t_gett();

if (msg->first_line.type == SIP_REPLY && trans != NULL && trans != T_UNDEFINED) {
cseq->s = trans->cseq_n.s+CSEQ_LEN;
cseq->len = trans->cseq_n.len-CSEQ_LEN;
if (msg->first_line.type == SIP_REPLY && trans != NULL && trans != T_UNDEFINED &&
trans->uas.request!=NULL ) {
*cseq = get_cseq(trans->uas.request)->number;
} else {
if (msg->cseq == NULL) {
if (parse_headers(msg, HDR_CSEQ_F, 0)==-1) {
Expand All @@ -465,11 +465,6 @@ get_cseq_number(struct sip_msg *msg, str *cseq)
*cseq = get_cseq(msg)->number;
}

if (cseq->s==NULL || cseq->len==0) {
LM_ERR("missing CSeq number\n");
return False;
}

return True;
}

Expand Down

0 comments on commit acb1b37

Please sign in to comment.