mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 22:30:28 +00:00
add support for event suppression for AMI-over-HTTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2974,8 +2974,14 @@ static int process_message(struct mansession *s, const struct message *m)
|
||||
}
|
||||
if (ret)
|
||||
return ret;
|
||||
/* Once done with our message, deliver any pending events */
|
||||
return process_events(s);
|
||||
/* Once done with our message, deliver any pending events unless the
|
||||
requester doesn't want them as part of this response.
|
||||
*/
|
||||
if (ast_strlen_zero(astman_get_header(m, "SuppressEvents"))) {
|
||||
return process_events(s);
|
||||
} else {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -3796,6 +3802,7 @@ static struct ast_str *generic_http_callback(enum output_format format,
|
||||
"Content-type: text/%s\r\n"
|
||||
"Cache-Control: no-cache;\r\n"
|
||||
"Set-Cookie: mansession_id=\"%08x\"; Version=\"1\"; Max-Age=%d\r\n"
|
||||
"Pragma: SuppressEvents\r\n"
|
||||
"\r\n",
|
||||
contenttype[format],
|
||||
s->managerid, httptimeout);
|
||||
|
||||
Reference in New Issue
Block a user