From f72b2a060d7c9201d56d24445b2f75746cef8481 Mon Sep 17 00:00:00 2001 From: David Vossel Date: Fri, 4 Dec 2009 17:22:31 +0000 Subject: [PATCH] Merged revisions 233116 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r233116 | dvossel | 2009-12-04 11:21:34 -0600 (Fri, 04 Dec 2009) | 6 lines document and rename strip_control() in app_voicemail (closes issue #16291) Reported by: wdoekes ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@233121 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index eb3769d7b7..1c6666fd9e 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -856,7 +856,13 @@ static int write_password_to_file(const char *secretfn, const char *password); static int __has_voicemail(const char *context, const char *mailbox, const char *folder, int shortcircuit); #endif -static char *strip_control(const char *input, char *buf, size_t buflen) +/*! + * \brief Strips control and non 7-bit clean characters from input string. + * + * \note To map control and none 7-bit characters to a 7-bit clean characters + * please use ast_str_encode_mine(). + */ +static char *strip_control_and_high(const char *input, char *buf, size_t buflen) { char *bufptr = buf; for (; *input; input++) { @@ -4210,10 +4216,10 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in #endif if (cidnum) { - strip_control(cidnum, enc_cidnum, sizeof(enc_cidnum)); + strip_control_and_high(cidnum, enc_cidnum, sizeof(enc_cidnum)); } if (cidname) { - strip_control(cidname, enc_cidname, sizeof(enc_cidname)); + strip_control_and_high(cidname, enc_cidname, sizeof(enc_cidname)); } gethostname(host, sizeof(host) - 1); @@ -4544,10 +4550,10 @@ static int sendpage(char *srcemail, char *pager, int msgnum, char *context, char } if (cidnum) { - strip_control(cidnum, enc_cidnum, sizeof(enc_cidnum)); + strip_control_and_high(cidnum, enc_cidnum, sizeof(enc_cidnum)); } if (cidname) { - strip_control(cidname, enc_cidname, sizeof(enc_cidname)); + strip_control_and_high(cidname, enc_cidname, sizeof(enc_cidname)); } if ((p = vm_mkftemp(tmp)) == NULL) {