}
-static void
-update_mwi(vm_profile_t *profile, const char *id, const char *domain_name,
- const char *myfolder)
+static void update_mwi(vm_profile_t *profile, const char *id, const char *domain_name, const char *myfolder)
{
char *mwi_id;
const char *yn = "no";
switch_xml_t x_domain = NULL, x_domain_root = NULL, x_user = NULL, x_params, x_param;
switch_status_t status;
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;
uint32_t timeout, attempts = 0;
int failed = 0;
play_msg_type = MSG_NONE;
attempts = profile->max_login_attempts;
myid = id;
+ actual_id = NULL;
mypass = NULL;
myfolder = "inbox";
vm_check_state = VM_CHECK_AUTH;
vm_execute_sql(profile, sql, profile->mutex);
vm_check_state = VM_CHECK_FOLDER_SUMMARY;
- update_mwi(profile, id, domain_name, myfolder);
+ update_mwi(profile, actual_id, domain_name, myfolder);
}
break;
case VM_CHECK_CONFIG:
if (x_box) {
myid = switch_core_session_strdup(session, x_box);
}
+
+ if (!(actual_id = switch_xml_attr(x_user, "id"))) {
+ actual_id = id;
+ }
}
}