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

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Wed Sep  4 15:14:08 2013 +0200

core: AmUriParser: simpler parse_nameaddr function (=parse_contact, parse first 
one)

---

 core/AmUriParser.cpp |    4 ++++
 core/AmUriParser.h   |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/core/AmUriParser.cpp b/core/AmUriParser.cpp
index 45748c3..45994d3 100644
--- a/core/AmUriParser.cpp
+++ b/core/AmUriParser.cpp
@@ -391,6 +391,10 @@ bool AmUriParser::parse_params(const string& line, int& 
pos) {
   return true;
 }
 
+bool AmUriParser::parse_nameaddr(const string& line) {
+  size_t end;
+  return parse_contact(line, 0, end);
+}
 
 bool AmUriParser::parse_contact(const string& line, size_t pos, size_t& end) {
   int p0 = skip_name(line, pos);
diff --git a/core/AmUriParser.h b/core/AmUriParser.h
index 8bca2e8..763cb34 100644
--- a/core/AmUriParser.h
+++ b/core/AmUriParser.h
@@ -47,6 +47,10 @@ struct AmUriParser {
 
   bool isEqual(const AmUriParser& c) const;
   /** @return true on success */
+  bool parse_nameaddr(const string& line);
+  /** parse nameaddr from pos
+       @return true on success
+       @return end of current nameaddr */
   bool parse_contact(const string& line, size_t pos, size_t& end);
   /** @return true on success */
   bool parse_uri();

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

Reply via email to