[Asterisk-Dev] strdupa in app_voicemail2.c
Thorsten Lockert
tholo at sigmasoft.com
Fri May 16 08:25:26 MST 2003
Some plain strdupa's snuck into the new voicemail system -- the
attached diff changes these to use ast_strdupa like all other
instances.
Index: apps/app_voicemail2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail2.c,v
retrieving revision 1.18
diff -u -r1.18 app_voicemail2.c
--- apps/app_voicemail2.c 13 May 2003 18:47:36 -0000 1.18
+++ apps/app_voicemail2.c 16 May 2003 15:31:29 -0000
@@ -588,19 +588,19 @@
return -1;
}
- fmts = strdupa(fmt);
+ fmts = ast_strdupa(fmt);
stringp=fmts;
strsep(&stringp, "|");
ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
- sfmt[0] = strdupa(fmts);
+ sfmt[0] = ast_strdupa(fmts);
while((fmt = strsep(&stringp, "|"))) {
if (fmtcnt > MAX_OTHER_FORMATS - 1) {
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app_voicemail.c\n");
break;
}
- sfmt[fmtcnt++] = strdupa(fmt);
+ sfmt[fmtcnt++] = ast_strdupa(fmt);
}
if (maxtime)
--
Thorsten Lockert | tholo at sigmasoft.com | Universe, n.:
2121 N. Lakeshore Dr. | tholo at openbsd.org | The problem.
Chapel Hill, NC 27514 | |
More information about the asterisk-dev
mailing list