Module: sems
Branch: master
Commit: 9acc53a22717733f15acbc96e1de7497f2e57bbd
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=9acc53a22717733f15acbc96e1de7497f2e57bbd

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Wed Aug 17 00:37:27 2011 +0200

b/f: add session media level and media attributes to SDP

---

 core/AmSdp.cpp |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/core/AmSdp.cpp b/core/AmSdp.cpp
index 6554b44..893bae2 100644
--- a/core/AmSdp.cpp
+++ b/core/AmSdp.cpp
@@ -162,6 +162,12 @@ void AmSdp::print(string& body) const
       "c=IN IP4 "+conn.address+"\r\n"
       "t=0 0\r\n";
 
+  // add attributes (session level)
+  for (std::vector<SdpAttribute>::const_iterator a_it=
+        attributes.begin(); a_it != attributes.end(); a_it++) {
+    out_buf += a_it->print();
+  }
+
   for(std::vector<SdpMedia>::const_iterator media_it = media.begin();
       media_it != media.end(); media_it++) {
       
@@ -204,6 +210,13 @@ void AmSdp::print(string& body) const
          break;
       default: break;
       }
+
+      // add attributes (media level)
+      for (std::vector<SdpAttribute>::const_iterator a_it=
+            media_it->attributes.begin(); a_it != media_it->attributes.end(); 
a_it++) {
+       out_buf += a_it->print();
+      }
+
   }
 
   body = out_buf;
@@ -1114,7 +1127,7 @@ static bool attr_check(std::string attr)
     return true;
   else
     {
-    DBG("sdp_parse_attr: Unknown attribute name used:%s, plz see RFC4566\n", 
+    DBG("sdp_parse_attr: Unknown attribute name used: %s, plz see RFC4566\n",
        (char*)attr.c_str());
     return false;
     }

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to