]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't broadcast FullyBooted to every AMI connection
authorTerry Wilson <twilson@digium.com>
Thu, 24 Feb 2011 17:42:16 +0000 (17:42 +0000)
committerTerry Wilson <twilson@digium.com>
Thu, 24 Feb 2011 17:42:16 +0000 (17:42 +0000)
The FullyBooted event should not be sent to every AMI connection every
time someone connects via AMI. It should only be sent to the user who
just connected.

(closes issue #18168)
Reported by: FeyFre
Patches:
      bug0018168.patch uploaded by FeyFre (license 1142)
Tested by: FeyFre, twilson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@308813 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index eb066ab4c2b38bb632d51c88ad5f704fcbb7ec20..700cdd8ebe486f944a7daf3781a548039e1d6c93 100644 (file)
@@ -2315,7 +2315,12 @@ static int process_message(struct mansession *s, const struct message *m)
                                        (s->session->sessiontimeout ? "HTTP " : ""), s->session->username, ast_inet_ntoa(s->session->sin.sin_addr));
                                astman_send_ack(s, m, "Authentication accepted");
                                if (ast_opt_send_fullybooted && ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) {
-                                       manager_event(EVENT_FLAG_SYSTEM, "FullyBooted", "Status: Fully Booted\r\n");
+                                       char auth[80];
+                                       authority_to_str(EVENT_FLAG_SYSTEM, auth, sizeof(auth));
+                                       astman_append(s, "Event: FullyBooted\r\n"
+                                               "Privilege: %s\r\n"
+                                               "Status: Fully Booted\r\n\r\n",
+                                               auth);
                                }
                        }
                } else if (!strcasecmp(action, "Logoff")) {