[sr-dev] git:master: modules_k:qos align qos module to the new sdp layout
Ovidiu Sas
osas at voipembedded.com
Mon Jun 28 15:52:28 CEST 2010
Module: sip-router
Branch: master
Commit: b123419e493dbe938cec57ffa8850dbab5255ad5
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b123419e493dbe938cec57ffa8850dbab5255ad5
Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date: Mon Jun 28 09:57:42 2010 -0400
modules_k:qos align qos module to the new sdp layout
- 'sendrecv_mode' and 'ptime' are session attributes now
---
modules_k/qos/qos_mi.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/modules_k/qos/qos_mi.c b/modules_k/qos/qos_mi.c
index 1b513e4..6644a85 100644
--- a/modules_k/qos/qos_mi.c
+++ b/modules_k/qos/qos_mi.c
@@ -56,18 +56,6 @@ int add_mi_sdp_payload_nodes(struct mi_node* node, int index, sdp_payload_attr_t
return 1;
}
- if (sdp_payload->sendrecv_mode.s!=NULL && sdp_payload->sendrecv_mode.len!=0) {
- attr = add_mi_attr(node1, MI_DUP_VALUE, "sendrecv", 8, sdp_payload->sendrecv_mode.s, sdp_payload->sendrecv_mode.len);
- if(attr == NULL)
- return 1;
- }
-
- if (sdp_payload->ptime.s!=NULL && sdp_payload->ptime.len!=0) {
- attr = add_mi_attr(node1, MI_DUP_VALUE, "ptime", 5, sdp_payload->ptime.s, sdp_payload->ptime.len);
- if(attr == NULL)
- return 1;
- }
-
return 0;
}
@@ -100,6 +88,18 @@ int add_mi_stream_nodes(struct mi_node* node, int index, sdp_stream_cell_t* stre
if(attr == NULL)
return 1;
+ if (stream->sendrecv_mode.s!=NULL && stream->sendrecv_mode.len!=0) {
+ attr = add_mi_attr(node1, MI_DUP_VALUE, "sendrecv", 8, stream->sendrecv_mode.s, stream->sendrecv_mode.len);
+ if(attr == NULL)
+ return 1;
+ }
+
+ if (stream->ptime.s!=NULL && stream->ptime.len!=0) {
+ attr = add_mi_attr(node1, MI_DUP_VALUE, "ptime", 5, stream->ptime.s, stream->ptime.len);
+ if(attr == NULL)
+ return 1;
+ }
+
p = int2str((unsigned long)(stream->payloads_num), &len);
attr = add_mi_attr(node1, MI_DUP_VALUE, "payloads_num", 12, p, len);
if(attr == NULL)
More information about the sr-dev
mailing list