mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
[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);
|
argc = switch_split(mycmd, ' ', argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc == 3) {
|
if (argc > 1) {
|
||||||
r = switch_xml_clear_user_cache(argv[0], argv[1], argv[2]);
|
r = switch_xml_clear_user_cache(argv[0], argv[1], argv[2]);
|
||||||
} else {
|
} else {
|
||||||
r = switch_xml_clear_user_cache(NULL, NULL, NULL);
|
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");
|
switch_snprintf(message, mlen, "Authentication Failure");
|
||||||
jsock->uid = NULL;
|
jsock->uid = NULL;
|
||||||
login_fire_custom_event(jsock, params, 0, "Authentication Failure");
|
login_fire_custom_event(jsock, params, 0, "Authentication Failure");
|
||||||
|
switch_xml_clear_user_cache("id", id, domain);
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"auth using %s\n",a1_hash ? "a1-hash" : "username & password");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"auth using %s\n",a1_hash ? "a1-hash" : "username & password");
|
||||||
r = SWITCH_TRUE;
|
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);
|
switch_mutex_lock(CACHE_MUTEX);
|
||||||
|
|
||||||
|
if (key && user_name && !domain_name) {
|
||||||
|
domain_name = switch_core_get_variable("domain");
|
||||||
|
}
|
||||||
|
|
||||||
if (key && user_name && domain_name) {
|
if (key && user_name && domain_name) {
|
||||||
switch_snprintf(mega_key, sizeof(mega_key), "%s%s%s", key, user_name, domain_name);
|
switch_snprintf(mega_key, sizeof(mega_key), "%s%s%s", key, user_name, domain_name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user