Module: sip-router
Branch: jason.penton/kamailio_ims_extensions
Commit: dcc87ed9859637110b58cb8317ec1ad8b033d468
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dcc87ed…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: Wed Oct 26 09:31:39 2011 +0200
parser/sdp: Add fast access to raw stream information
- This gives a fast access pointer to the raw stream information
used in parsing the sdp_stream_cell structure.
---
parser/sdp/sdp.c | 4 ++++
parser/sdp/sdp.h | 1 +
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/parser/sdp/sdp.c b/parser/sdp/sdp.c
index 6d53ab9..9dbf2de 100644
--- a/parser/sdp/sdp.c
+++ b/parser/sdp/sdp.c
@@ -474,6 +474,10 @@ static int parse_sdp_session(str *sdp_body, int session_num, str
*cnt_disp, sdp_
stream = add_sdp_stream(session, stream_num, &sdp_media, &sdp_port,
&sdp_transport, &sdp_payload, is_rtp, pf, &sdp_ip);
if (stream == 0) return -1;
+ /* Store fast access ptr to raw stream */
+ stream->raw_stream.s = tmpstr1.s;
+ stream->raw_stream.len = tmpstr1.len;
+
/* increment total number of streams */
_sdp->streams_num++;
diff --git a/parser/sdp/sdp.h b/parser/sdp/sdp.h
index 353580c..1a1ea95 100644
--- a/parser/sdp/sdp.h
+++ b/parser/sdp/sdp.h
@@ -72,6 +72,7 @@ typedef struct sdp_stream_cell {
str max_size; /**< RFC4975: max-size attribute */
str accept_types; /**< RFC4975: accept-types attribute */
str accept_wrapped_types; /**< RFC4975: accept-wrapped-types
attribute */
+ str raw_stream; /**< fast access to raw stream information */
struct sdp_payload_attr **p_payload_attr; /**< fast access pointers to payloads */
struct sdp_payload_attr *payload_attr;
} sdp_stream_cell_t;