summaryrefslogtreecommitdiff
path: root/main/config.c
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2007-08-06 16:31:42 +0000
committerJason Parker <jparker@digium.com>2007-08-06 16:31:42 +0000
commit3f0a1faed208d7a22e935369062351304c88d8a1 (patch)
tree146d95bf6e1b1ee2890579e1e5c69ea2d3f1e5ec /main/config.c
parentbb700d82cee03c1582272070527873815a7500c6 (diff)
Merged revisions 78180 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #9938) ........ r78180 | qwell | 2007-08-06 11:30:51 -0500 (Mon, 06 Aug 2007) | 5 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@78181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/config.c b/main/config.c
index 4ce77798c..7c9106cc3 100644
--- a/main/config.c
+++ b/main/config.c
@@ -851,9 +851,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) {