Backport fix for 11520--for some reason I didn't do this back in February when I patched for trunk.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@121992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2008-06-11 23:47:23 +00:00
parent 1c7d9e4c9a
commit c340004d76
6 changed files with 146 additions and 7 deletions

View File

@@ -1387,6 +1387,18 @@ char *ast_read_textfile(const char *filename)
return output;
}
void ast_app_options2str(const struct ast_app_option *options, struct ast_flags *flags, char *buf, size_t len)
{
unsigned int i, found = 0;
for (i = 32; i < 128 && found < len;i++) {
if (ast_test_flag(flags, options[i].flag)) {
buf[found++] = i;
}
}
buf[found] = '\0';
}
int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags *flags, char **args, char *optstr)
{
char *s;