mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
don't set the event mask if the given eventmask was not valid
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -424,10 +424,11 @@ static int set_eventmask(struct mansession *s, char *eventmask)
|
|||||||
int maskint = ast_strings_to_mask(eventmask);
|
int maskint = ast_strings_to_mask(eventmask);
|
||||||
|
|
||||||
ast_mutex_lock(&s->lock);
|
ast_mutex_lock(&s->lock);
|
||||||
|
if (maskint >= 0)
|
||||||
s->send_events = maskint;
|
s->send_events = maskint;
|
||||||
ast_mutex_unlock(&s->lock);
|
ast_mutex_unlock(&s->lock);
|
||||||
|
|
||||||
return s->send_events;
|
return maskint;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int authenticate(struct mansession *s, struct message *m)
|
static int authenticate(struct mansession *s, struct message *m)
|
||||||
|
|||||||
Reference in New Issue
Block a user