[asterisk-commits] anthonyl: branch anthonyl/usersconf-vmpassword
r50993 - /team/anthonyl/usersc...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jan 15 16:44:12 MST 2007
Author: anthonyl
Date: Mon Jan 15 17:44:11 2007
New Revision: 50993
URL: http://svn.digium.com/view/asterisk?view=rev&rev=50993
Log:
preserve comments and get rid of 2 warnings from gcc on build
Modified:
team/anthonyl/usersconf-vmpassword/apps/app_voicemail.c
Modified: team/anthonyl/usersconf-vmpassword/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/usersconf-vmpassword/apps/app_voicemail.c?view=diff&rev=50993&r1=50992&r2=50993
==============================================================================
--- team/anthonyl/usersconf-vmpassword/apps/app_voicemail.c (original)
+++ team/anthonyl/usersconf-vmpassword/apps/app_voicemail.c Mon Jan 15 17:44:11 2007
@@ -782,14 +782,15 @@
struct ast_config *cfg=NULL;
struct ast_variable *var=NULL;
struct ast_category *cat=NULL;
- char *category=NULL, *tmp=NULL, *value=NULL, *new=NULL;
+ char *category=NULL, *value=NULL, *new=NULL;
+ const char *tmp=NULL;
int len;
if (!change_password_realtime(vmu, newpassword))
return;
/* check voicemail.conf */
- if ((cfg = ast_config_load(VOICEMAIL_CONFIG))) {
+ if ((cfg = ast_config_load_with_comments(VOICEMAIL_CONFIG))) {
while ((category = ast_category_browse(cfg, category))) {
if (!strcasecmp(category, vmu->context)) {
tmp = ast_variable_retrieve(cfg, category, vmu->mailbox);
@@ -828,7 +829,7 @@
var = NULL;
/* check users.conf and update the password stored for the mailbox*/
/* if no vmpassword entry exists create one. */
- if ((cfg = ast_config_load("users.conf"))) {
+ if ((cfg = ast_config_load_with_comments("users.conf"))) {
ast_log(LOG_WARNING, "we are looking for %s\n", vmu->mailbox);
while ((category = ast_category_browse(cfg, category))) {
ast_log(LOG_WARNING, "users.conf: %s\n", category);
More information about the asterisk-commits
mailing list