aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-06 16:30:51 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-06 16:30:51 +0000
commitef04c2f788c8d07d33d178f464018b153a04a728 (patch)
tree702f523e8753468a71058fc7b7f68c6abf1e7bc3 /main
parent7e471ac27c8ca96d72c7188de9d2dd68dde8a04a (diff)
Fix an issue with using UpdateConfig (manager action) where escaped semicolons
in a config would be converted to just semicolons (\; to ;) Issue 9938 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78180 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/config.c b/main/config.c
index bea1cfc1e..5e7b19c60 100644
--- a/main/config.c
+++ b/main/config.c
@@ -862,9 +862,8 @@ static struct ast_config *config_text_file_load(const char *database, const char
while ((comment_p = strchr(new_buf, COMMENT_META))) {
if ((comment_p > new_buf) && (*(comment_p-1) == '\\')) {
- /* Yuck, gotta memmove */
- memmove(comment_p - 1, comment_p, strlen(comment_p) + 1);
- new_buf = comment_p;
+ /* Escaped semicolons aren't comments. */
+ new_buf = comment_p + 1;
} else if(comment_p[1] == COMMENT_TAG && comment_p[2] == COMMENT_TAG && (comment_p[3] != '-')) {
/* Meta-Comment start detected ";--" */
if (comment < MAX_NESTED_COMMENTS) {