]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Adjust RTP instance's available_formats callback to return the correct type.
authorMark Michelson <mmichelson@digium.com>
Thu, 20 Dec 2012 20:26:47 +0000 (20:26 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 20 Dec 2012 20:26:47 +0000 (20:26 +0000)
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

index c7f3a92586e6fbfd34e09d5d68b93f552c9ee6d1..f50e0ee974bbfb8bfc4067569d1feefe219cb9e1 100644 (file)
@@ -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 */