[asterisk-commits] anthonyl: branch anthonyl/voicemail-fixups
r51169 - /team/anthonyl/voicemail-...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jan 16 16:58:50 MST 2007
Author: anthonyl
Date: Tue Jan 16 17:58:49 2007
New Revision: 51169
URL: http://svn.digium.com/view/asterisk?view=rev&rev=51169
Log:
fixed up some problems svnmerge caused in apply_options_full(), also fixed a typo in my last commit.
Modified:
team/anthonyl/voicemail-fixups/apps/app_voicemail.c
Modified: team/anthonyl/voicemail-fixups/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/voicemail-fixups/apps/app_voicemail.c?view=diff&rev=51169&r1=51168&r2=51169
==============================================================================
--- team/anthonyl/voicemail-fixups/apps/app_voicemail.c (original)
+++ team/anthonyl/voicemail-fixups/apps/app_voicemail.c Tue Jan 16 17:58:49 2007
@@ -657,12 +657,11 @@
struct ast_variable *tmp;
tmp = var;
while (tmp) {
- if (!strcasecmp(tmp->name, "password") || !strcasecmp(tmp->name, "secret")) {
+ if (!strcasecmp(tmp->name, "vmpassword")) {
ast_copy_string(retval->password, tmp->value, sizeof(retval->password));
- } else if (!strcasecmp(tmp->name, "secret")) {
- /* dont let secret override vmpassword */
+ } else if (!strcasecmp(tmp->name, "secret")) { /* don't overwrite vmpassword if it exists */
if (ast_strlen_zero(retval->password))
- ast_copy_string(retval->password, tmp->value, sizeof(retval->password));
+ ast_copy_string(retval->password, tmp->value, sizeof(retval->password));
} else if (!strcasecmp(tmp->name, "uniqueid")) {
ast_copy_string(retval->uniqueid, tmp->value, sizeof(retval->uniqueid));
} else if (!strcasecmp(tmp->name, "pager")) {
@@ -782,7 +781,7 @@
break;
}
len = (strlen(value) + strlen(newpassword));
- new = ast_calloc(len+1);
+ new = alloca(len+1);
sprintf(new,"%s%s", newpassword, value);
if (!(cat = ast_category_get(cfg, category))) {
ast_log(LOG_WARNING, "Failed to get category structure.\n");
More information about the asterisk-commits
mailing list