Module: sip-router
Branch: master
Commit: 1dec97e86e473574d0b767af21ad6757fa4d1342
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1dec97e…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: Wed May 12 20:06:12 2010 -0400
sdp parser: remove dead code
- remove dead code from sdp.c
---
parser/sdp/sdp.c | 26 ++------------------------
1 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/parser/sdp/sdp.c b/parser/sdp/sdp.c
index 4a6697f..07ca839 100644
--- a/parser/sdp/sdp.c
+++ b/parser/sdp/sdp.c
@@ -313,31 +313,9 @@ sdp_stream_cell_t* get_sdp_stream_sdp(struct sdp_info* sdp, int
session_num, int
sdp_stream_cell_t* get_sdp_stream(struct sip_msg* _m, int session_num, int stream_num)
{
- sdp_info_t* sdp;
- sdp_session_cell_t *session;
- sdp_stream_cell_t *stream;
-
+ if (_m->body == NULL) return NULL;
+ if (_m->body->type != MSG_BODY_SDP) return NULL;
return get_sdp_stream_sdp((sdp_info_t*)_m->body, session_num, stream_num);
-
- sdp = (sdp_info_t*)_m->body;
- if (sdp == NULL) return NULL;
- if (sdp->type != MSG_BODY_SDP) return NULL;
- if (session_num > sdp->sessions_num) return NULL;
-
- session = sdp->sessions;
- while (session) {
- if (session->session_num == session_num) {
- stream = session->streams;
- while (stream) {
- if (stream->stream_num == stream_num) return stream;
- stream = stream->next;
- }
- } else {
- session = session->next;
- }
- }
-
- return NULL;
}