don't set the event mask if the given eventmask was not valid
authorRussell Bryant <russell@russellbryant.com>
Mon, 25 Jul 2005 23:01:39 +0000 (23:01 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 25 Jul 2005 23:01:39 +0000 (23:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6215 65c4cc65-6c06-0410-ace0-fbb531ad65f3

manager.c

index 4dfefb3..a5044eb 100755 (executable)
--- a/manager.c
+++ b/manager.c
@@ -424,10 +424,11 @@ static int set_eventmask(struct mansession *s, char *eventmask)
        int maskint = ast_strings_to_mask(eventmask);
 
        ast_mutex_lock(&s->lock);
-       s->send_events = maskint;
+       if (maskint >= 0)       
+               s->send_events = maskint;
        ast_mutex_unlock(&s->lock);
        
-       return s->send_events;
+       return maskint;
 }
 
 static int authenticate(struct mansession *s, struct message *m)