aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-22 16:51:22 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-22 16:51:22 +0000
commita09dfb74c6d47b649f066fcde9591b2036708e08 (patch)
tree0b294febe0dfdc81a30f324ce7fdf76614a756f0 /res/res_agi.c
parent5123e1ee5d7db17a5ecb6ebdf2057209d1ba059f (diff)
Fix res_agi compilation after the const-ify the world merge.
Since we are dealing with a 'const char * const' now, we have to create a temporary copy of the string to work on rather than the original. Fix inspired by reporter. Reviewed by everyone-and-their-mother in #asterisk-dev. (closes issue #15184) Reported by: andrew git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196270 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index f7ff01c5e..9d312b823 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -3199,9 +3199,9 @@ static int write_htmldump(const char *filename)
fprintf(htmlfile, "<TR><TH ALIGN=\"CENTER\"><B>%s - %s</B></TH></TR>\n", fullcmd, command->summary);
#ifdef AST_XML_DOCS
stringptmp = ast_xmldoc_printable(command->usage, 0);
- stringp = stringptmp;
+ stringp = ast_strdup(stringptmp);
#else
- stringp = command->usage;
+ stringp = ast_strdup(command->usage);
#endif
tempstr = strsep(&stringp, "\n");
@@ -3216,6 +3216,7 @@ static int write_htmldump(const char *filename)
}
fprintf(htmlfile, "</TD></TR>\n");
fprintf(htmlfile, "</TABLE></TD></TR>\n\n");
+ ast_free(stringp);
#ifdef AST_XML_DOCS
ast_free(stringptmp);
#endif