Created
February 12, 2014 09:22
-
-
Save saghul/8952340 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/mediaproxy/mediaproxy.c b/modules/mediaproxy/mediaproxy.c | |
index 625372b..3e32c0c 100644 | |
--- a/modules/mediaproxy/mediaproxy.c | |
+++ b/modules/mediaproxy/mediaproxy.c | |
@@ -446,24 +446,15 @@ get_callid(struct sip_msg* msg, str *cid) | |
static Bool | |
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; | |
- } else { | |
- if (msg->cseq == NULL) { | |
- if (parse_headers(msg, HDR_CSEQ_F, 0)==-1) { | |
- LM_ERR("cannot parse CSeq header\n"); | |
- return False; | |
- } | |
- if (msg->cseq == NULL) { | |
- LM_ERR("missing CSeq header\n"); | |
- return False; | |
- } | |
- } | |
- *cseq = get_cseq(msg)->number; | |
+ if (parse_headers(msg, HDR_CSEQ_F, 0)==-1) { | |
+ LM_ERR("cannot parse CSeq header\n"); | |
+ return False; | |
+ } | |
+ if (msg->cseq == NULL) { | |
+ LM_ERR("missing CSeq header\n"); | |
+ return False; | |
} | |
+ *cseq = get_cseq(msg)->number; | |
if (cseq->s==NULL || cseq->len==0) { | |
LM_ERR("missing CSeq number\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment