diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-12-01 20:27:37 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-12-01 20:27:37 +0000 |
commit | f59fe83c56f6539c09eb068a94d2db60bfb18f17 (patch) | |
tree | 72344fb3a18484772df8f496cc1f9be6e902c64f /channels/chan_sip.c | |
parent | b2d115bce95e02589972ad4f07cb9a959ea02139 (diff) |
More 32->64 bit codec conversions.
In the process of swapping ULAW to a place in the extended codec space, we
found several unhandled cases, where a 32-bit integer was still being used to
handle a codec field. Most of these have been fixed with this commit, although
there is at least one case (codec_dahdi) which depends upon outside headers to
be altered before a conversion can be made.
(Fixes AST-278, SWP-459)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b47e33084..eab73f7b8 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -212,6 +212,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <signal.h> #include <sys/signal.h> #include <regex.h> +#include <inttypes.h> #include "asterisk/network.h" #include "asterisk/paths.h" /* need ast_config_AST_SYSTEM_NAME */ @@ -10353,7 +10354,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p, format_t codec, if (debug) - ast_verbose("Adding codec 0x%Lx (%s) to SDP\n", (long long) codec, ast_getformatname(codec)); + ast_verbose("Adding codec 0x%" PRIx64 " (%s) to SDP\n", codec, ast_getformatname(codec)); if ((rtp_code = ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(p->rtp), 1, codec)) == -1) return; @@ -10401,7 +10402,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p, format_t codec, /*! \brief Add video codec offer to SDP offer/answer body in INVITE or 200 OK */ /* This is different to the audio one now so we can add more caps later */ -static void add_vcodec_to_sdp(const struct sip_pvt *p, int codec, +static void add_vcodec_to_sdp(const struct sip_pvt *p, format_t codec, struct ast_str **m_buf, struct ast_str **a_buf, int debug, int *min_packet_size) { @@ -10411,7 +10412,7 @@ static void add_vcodec_to_sdp(const struct sip_pvt *p, int codec, return; if (debug) - ast_verbose("Adding video codec 0x%x (%s) to SDP\n", codec, ast_getformatname(codec)); + ast_verbose("Adding video codec 0x%" PRIx64 " (%s) to SDP\n", codec, ast_getformatname(codec)); if ((rtp_code = ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(p->vrtp), 1, codec)) == -1) return; @@ -10726,7 +10727,7 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int } /* Now send any other common audio and video codecs, and non-codec formats: */ - for (x = 1LL; x <= (needtext ? AST_FORMAT_TEXT_MASK : (needvideo ? AST_FORMAT_VIDEO_MASK : AST_FORMAT_AUDIO_MASK)); x <<= 1) { + for (x = 1ULL; x <= (needtext ? AST_FORMAT_TEXT_MASK : (needvideo ? AST_FORMAT_VIDEO_MASK : AST_FORMAT_AUDIO_MASK)); x <<= 1) { if (!(capability & x)) /* Codec not requested */ continue; |