summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2011-09-13 07:35:59 +0000
committerRussell Bryant <russell@russellbryant.com>2011-09-13 07:35:59 +0000
commit2a25779d47e2ef5f750f209c5c366a5ccca388e4 (patch)
treef525b7db31dd7317201d3e3d661459d11bbc86a1 /include/asterisk
parent638f34df7f58ba98a74f0b5c9bd4b416dfc87a67 (diff)
Merged revisions 335510 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r335510 | russell | 2011-09-13 02:24:34 -0500 (Tue, 13 Sep 2011) | 22 lines Merged revisions 335497 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r335497 | russell | 2011-09-13 02:11:36 -0500 (Tue, 13 Sep 2011) | 15 lines Fix a crash in res_ais. This patch resolves a crash observed in a load testing environment that involved the use of the res_ais module. I observed some crashes where the event delivery callback would get called, but the length parameter incidcating how much data there was to read was 0. The code assumed (with good reason I would think) that if this callback got called, there was an event available to read. However, if the rare case that there's nothing there, catch it and return instead of blowing up. More specifically, the change always ensure that the size of the received event in the cluster is always big enough to be a real ast_event. Review: https://reviewboard.asterisk.org/r/1423/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/event.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asterisk/event.h b/include/asterisk/event.h
index 73f121c97..90e27b2f6 100644
--- a/include/asterisk/event.h
+++ b/include/asterisk/event.h
@@ -743,6 +743,13 @@ void *ast_event_iterator_get_ie_raw(struct ast_event_iterator *iterator);
*/
uint16_t ast_event_iterator_get_ie_raw_payload_len(struct ast_event_iterator *iterator);
+/*!
+ * \brief Get the minimum length of an ast_event.
+ *
+ * \return minimum amount of memory that will be consumed by any ast_event.
+ */
+size_t ast_event_minimum_length(void);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif