[asterisk-commits] file: trunk r47399 - in /trunk: ./
apps/app_voicemail.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Nov 9 15:34:01 MST 2006
Author: file
Date: Thu Nov 9 16:34:00 2006
New Revision: 47399
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47399
Log:
Merged revisions 47398 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r47398 | file | 2006-11-09 17:32:30 -0500 (Thu, 09 Nov 2006) | 2 lines
Do conversion in a more easier to read and working way for \r, \n, and \t. (issue #8324 reported by johnlange)
........
Modified:
trunk/ (props changed)
trunk/apps/app_voicemail.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=47399&r1=47398&r2=47399
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Nov 9 16:34:00 2006
@@ -7512,13 +7512,17 @@
tmpread = tmpwrite = emailbody;
while ((tmpwrite = strchr(tmpread,'\\'))) {
switch (tmpwrite[1]) {
+ case 'r':
+ memmove(tmpwrite + 1, tmpwrite + 2, strlen(tmpwrite + 2) + 1);
+ *tmpwrite = '\r';
+ break;
case 'n':
- *tmpwrite++ = '\n';
- memmove(tmpwrite, tmpwrite + 1, strlen(tmpwrite + 1) + 1);
+ memmove(tmpwrite + 1, tmpwrite + 2, strlen(tmpwrite + 2) + 1);
+ *tmpwrite = '\n';
break;
case 't':
- *tmpwrite++ = '\t';
- memmove(tmpwrite, tmpwrite + 1, strlen(tmpwrite + 1) + 1);
+ memmove(tmpwrite + 1, tmpwrite + 2, strlen(tmpwrite + 2) + 1);
+ *tmpwrite = '\t';
break;
default:
ast_log(LOG_NOTICE, "Substitution routine does not support this character: %c\n", tmpwrite[1]);
@@ -7536,13 +7540,17 @@
tmpread = tmpwrite = pagerbody;
while ((tmpwrite = strchr(tmpread, '\\'))) {
switch (tmpwrite[1]) {
+ case 'r':
+ memmove(tmpwrite + 1, tmpwrite + 2, strlen(tmpwrite + 2) + 1);
+ *tmpwrite = '\r';
+ break;
case 'n':
- *tmpwrite++ = '\n';
- memmove(tmpwrite, tmpwrite + 1, strlen(tmpwrite + 1) + 1);
+ memmove(tmpwrite + 1, tmpwrite + 2, strlen(tmpwrite + 2) + 1);
+ *tmpwrite = '\n';
break;
case 't':
- *tmpwrite++ = '\t';
- memmove(tmpwrite, tmpwrite + 1, strlen(tmpwrite + 1) + 1);
+ memmove(tmpwrite + 1, tmpwrite + 2, strlen(tmpwrite + 2) + 1);
+ *tmpwrite = '\t';
break;
default:
ast_log(LOG_NOTICE, "Substitution routine does not support this character: %c\n", tmpwrite[1]);
More information about the asterisk-commits
mailing list