[core, mod_commands, mod_verto] small tweaks to cache stuff to allow clear from verto and allow no domain to imply the default domain
This commit is contained in:
parent
f540bbbbe3
commit
39b3caacb5
|
@ -6742,7 +6742,7 @@ SWITCH_STANDARD_API(xml_flush_function)
|
|||
argc = switch_split(mycmd, ' ', argv);
|
||||
}
|
||||
|
||||
if (argc == 3) {
|
||||
if (argc > 1) {
|
||||
r = switch_xml_clear_user_cache(argv[0], argv[1], argv[2]);
|
||||
} else {
|
||||
r = switch_xml_clear_user_cache(NULL, NULL, NULL);
|
||||
|
|
|
@ -1118,6 +1118,7 @@ static switch_bool_t check_auth(jsock_t *jsock, cJSON *params, int *code, char *
|
|||
switch_snprintf(message, mlen, "Authentication Failure");
|
||||
jsock->uid = NULL;
|
||||
login_fire_custom_event(jsock, params, 0, "Authentication Failure");
|
||||
switch_xml_clear_user_cache("id", id, domain);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"auth using %s\n",a1_hash ? "a1-hash" : "username & password");
|
||||
r = SWITCH_TRUE;
|
||||
|
|
|
@ -2010,6 +2010,10 @@ SWITCH_DECLARE(uint32_t) switch_xml_clear_user_cache(const char *key, const char
|
|||
|
||||
switch_mutex_lock(CACHE_MUTEX);
|
||||
|
||||
if (key && user_name && !domain_name) {
|
||||
domain_name = switch_core_get_variable("domain");
|
||||
}
|
||||
|
||||
if (key && user_name && domain_name) {
|
||||
switch_snprintf(mega_key, sizeof(mega_key), "%s%s%s", key, user_name, domain_name);
|
||||
|
||||
|
|
Loading…
Reference in New Issue