From c9e7b549b11b362daaa69e9c745460dfb03cd62f Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Thu, 20 Dec 2012 20:26:47 +0000 Subject: [PATCH] Adjust RTP instance's available_formats callback to return the correct type. The RTP engine public function that gets the available formats expects a format_t to be returned; however when calling into an RTP instance's callback to get the available formats, the callback returned an int. This never was noticed in Asterisk because the two RTP engines included do not provide an available_formats callback. This introduces an API change, and the proposal for this change was brought up on the Asterisk developers mailing list [1]. There was no public objection to this change, so it is now being put in. (closes AST-1054) reported by Doug Bailey [1] http://lists.digium.com/pipermail/asterisk-dev/2012-December/058058.html git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@378147 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/rtp_engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index c7f3a92586..f50e0ee974 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -374,7 +374,7 @@ struct ast_rtp_engine { /*! Callback to request that the RTP engine send a STUN BIND request */ void (*stun_request)(struct ast_rtp_instance *instance, struct ast_sockaddr *suggestion, const char *username); /*! Callback to get the transcodeable formats supported */ - int (*available_formats)(struct ast_rtp_instance *instance, format_t to_endpoint, format_t to_asterisk); + format_t (*available_formats)(struct ast_rtp_instance *instance, format_t to_endpoint, format_t to_asterisk); /*! Callback to send CNG */ int (*sendcng)(struct ast_rtp_instance *instance, int level); /*! Linked list information */