aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/abstract_jb.h
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-22 17:05:17 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-22 17:05:17 +0000
commit75865d5802e68f217cb6d5b27e205948a935883e (patch)
tree09e0da9c9e65e62322d7b473d2f44a59feef1bbb /include/asterisk/abstract_jb.h
parentf3f7a9e1aaee38f18bc703bef74d441b3069eb41 (diff)
- dynamically allocate the ast_jb structure that is on the channel structure
so that channels not using a jitterbuffer don't waste as much memory - ensure that the channel drivers that use jitterbuffers can handle a failure from configuring a jitterbuffer on a new channel because of a memory allocation error - On passing through these channel drivers, configure the jitterbuffer before starting the PBX thread instead of afterwards. If the pbx fails to start for whatever reason, this would have caused a crash. - Also on passing, move the increase of the usecount to after all of the possible failure conditions in the function - fix a place where ast_update_use_count() was not called - ensure that the owner channel pointer of the channel pvt strcutures is set to NULL in failure conditions git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35553 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/abstract_jb.h')
-rw-r--r--include/asterisk/abstract_jb.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asterisk/abstract_jb.h b/include/asterisk/abstract_jb.h
index 014902be8..8f365a860 100644
--- a/include/asterisk/abstract_jb.h
+++ b/include/asterisk/abstract_jb.h
@@ -202,16 +202,22 @@ int ast_jb_read_conf(struct ast_jb_conf *conf, char *varname, char *value);
*
* Called from a channel driver when a channel is created and its jitterbuffer needs
* to be configured.
+ *
+ * \retval 0 success
+ * \retval -1 failure
*/
-void ast_jb_configure(struct ast_channel *chan, const struct ast_jb_conf *conf);
+int ast_jb_configure(struct ast_channel *chan, const struct ast_jb_conf *conf);
/*!
* \brief Copies a channel's jitterbuffer configuration.
* \param chan channel.
* \param conf destination.
+ *
+ * \retval 0 success
+ * \retval -1 failure
*/
-void ast_jb_get_config(const struct ast_channel *chan, struct ast_jb_conf *conf);
+int ast_jb_get_config(const struct ast_channel *chan, struct ast_jb_conf *conf);
#if defined(__cplusplus) || defined(c_plusplus)