mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@196270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
fprintf(htmlfile, "<TR><TH ALIGN=\"CENTER\"><B>%s - %s</B></TH></TR>\n", fullcmd, command->summary);
|
||||||
#ifdef AST_XML_DOCS
|
#ifdef AST_XML_DOCS
|
||||||
stringptmp = ast_xmldoc_printable(command->usage, 0);
|
stringptmp = ast_xmldoc_printable(command->usage, 0);
|
||||||
stringp = stringptmp;
|
stringp = ast_strdup(stringptmp);
|
||||||
#else
|
#else
|
||||||
stringp = command->usage;
|
stringp = ast_strdup(command->usage);
|
||||||
#endif
|
#endif
|
||||||
tempstr = strsep(&stringp, "\n");
|
tempstr = strsep(&stringp, "\n");
|
||||||
|
|
||||||
@@ -3216,6 +3216,7 @@ static int write_htmldump(const char *filename)
|
|||||||
}
|
}
|
||||||
fprintf(htmlfile, "</TD></TR>\n");
|
fprintf(htmlfile, "</TD></TR>\n");
|
||||||
fprintf(htmlfile, "</TABLE></TD></TR>\n\n");
|
fprintf(htmlfile, "</TABLE></TD></TR>\n\n");
|
||||||
|
ast_free(stringp);
|
||||||
#ifdef AST_XML_DOCS
|
#ifdef AST_XML_DOCS
|
||||||
ast_free(stringptmp);
|
ast_free(stringptmp);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user