possible fix for MODAPP-153
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9900 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
584669c25e
commit
598d6df506
|
@ -1546,9 +1546,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void update_mwi(vm_profile_t *profile, const char *id, const char *domain_name, const char *myfolder)
|
||||||
update_mwi(vm_profile_t *profile, const char *id, const char *domain_name,
|
|
||||||
const char *myfolder)
|
|
||||||
{
|
{
|
||||||
char *mwi_id;
|
char *mwi_id;
|
||||||
const char *yn = "no";
|
const char *yn = "no";
|
||||||
|
@ -1589,7 +1587,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
||||||
switch_xml_t x_domain = NULL, x_domain_root = NULL, x_user = NULL, x_params, x_param;
|
switch_xml_t x_domain = NULL, x_domain_root = NULL, x_user = NULL, x_params, x_param;
|
||||||
switch_status_t status;
|
switch_status_t status;
|
||||||
char pass_buf[80] = "", *mypass = NULL, id_buf[80] = "", *myfolder = NULL;
|
char pass_buf[80] = "", *mypass = NULL, id_buf[80] = "", *myfolder = NULL;
|
||||||
const char *thepass = NULL, *myid = id;
|
const char *thepass = NULL, *myid = id, *actual_id = NULL;
|
||||||
char term = 0;
|
char term = 0;
|
||||||
uint32_t timeout, attempts = 0;
|
uint32_t timeout, attempts = 0;
|
||||||
int failed = 0;
|
int failed = 0;
|
||||||
|
@ -1640,6 +1638,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
||||||
play_msg_type = MSG_NONE;
|
play_msg_type = MSG_NONE;
|
||||||
attempts = profile->max_login_attempts;
|
attempts = profile->max_login_attempts;
|
||||||
myid = id;
|
myid = id;
|
||||||
|
actual_id = NULL;
|
||||||
mypass = NULL;
|
mypass = NULL;
|
||||||
myfolder = "inbox";
|
myfolder = "inbox";
|
||||||
vm_check_state = VM_CHECK_AUTH;
|
vm_check_state = VM_CHECK_AUTH;
|
||||||
|
@ -1746,7 +1745,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
||||||
vm_execute_sql(profile, sql, profile->mutex);
|
vm_execute_sql(profile, sql, profile->mutex);
|
||||||
vm_check_state = VM_CHECK_FOLDER_SUMMARY;
|
vm_check_state = VM_CHECK_FOLDER_SUMMARY;
|
||||||
|
|
||||||
update_mwi(profile, id, domain_name, myfolder);
|
update_mwi(profile, actual_id, domain_name, myfolder);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VM_CHECK_CONFIG:
|
case VM_CHECK_CONFIG:
|
||||||
|
@ -1950,6 +1949,10 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
||||||
if (x_box) {
|
if (x_box) {
|
||||||
myid = switch_core_session_strdup(session, x_box);
|
myid = switch_core_session_strdup(session, x_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(actual_id = switch_xml_attr(x_user, "id"))) {
|
||||||
|
actual_id = id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue