mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
small logic bug in new event auth code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16185 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
c37a725135
commit
42f8ffca56
@ -1621,6 +1621,7 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
|||||||
if (type <= SWITCH_EVENT_ALL) {
|
if (type <= SWITCH_EVENT_ALL) {
|
||||||
listener->allowed_event_list[type] = 1;
|
listener->allowed_event_list[type] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == SWITCH_EVENT_CUSTOM) {
|
if (type == SWITCH_EVENT_CUSTOM) {
|
||||||
custom++;
|
custom++;
|
||||||
}
|
}
|
||||||
@ -2160,7 +2161,7 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
|||||||
|
|
||||||
|
|
||||||
if (custom) {
|
if (custom) {
|
||||||
if (listener->allowed_event_hash && switch_core_hash_find(listener->allowed_event_hash, cur)) {
|
if (!listener->allowed_event_hash || switch_core_hash_find(listener->allowed_event_hash, cur)) {
|
||||||
switch_core_hash_insert(listener->event_hash, cur, MARKER);
|
switch_core_hash_insert(listener->event_hash, cur, MARKER);
|
||||||
} else {
|
} else {
|
||||||
switch_snprintf(reply, reply_len, "-ERR permission denied");
|
switch_snprintf(reply, reply_len, "-ERR permission denied");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user