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

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Wed Oct 27 00:24:31 2010 +0200

support escaped " in config values (\")

---

 core/AmConfigReader.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/core/AmConfigReader.cpp b/core/AmConfigReader.cpp
index 88c7a34..72802d9 100644
--- a/core/AmConfigReader.cpp
+++ b/core/AmConfigReader.cpp
@@ -96,10 +96,13 @@ int  AmConfigReader::loadFile(const string& path)
     TRIM(c);
 
     if(*c == '"'){
-
+      char last_c = ' ';
       val_beg = ++c;
 
-      while( (*c != '"') && (*c != '\0') ) c++;
+      while( ((*c != '"') || (last_c == '\\')) && (*c != '\0') ) {
+       last_c = *c;
+       c++;
+      }
 
       if(*c == '\0')
        goto syntax_error;

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

Reply via email to