[asterisk-commits] tilghman: trunk r239074 - in /trunk: addons/ channels/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jan 10 13:37:34 CST 2010
Author: tilghman
Date: Sun Jan 10 13:37:30 2010
New Revision: 239074
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=239074
Log:
According to POSIX, the capital L modifier applies only to floating point types.
Fixes a crash on Solaris.
(closes issue #16572)
Reported by: crjw
Patches:
frame_changes.patch uploaded by crjw (license 963)
Plus several others found and fixed by me
Modified:
trunk/addons/chan_ooh323.c
trunk/channels/chan_iax2.c
trunk/main/frame.c
Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=239074&r1=239073&r2=239074
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Sun Jan 10 13:37:30 2010
@@ -558,7 +558,7 @@
oldformat = format;
format &= AST_FORMAT_AUDIO_MASK;
if (!format) {
- ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%Ld'\n", (long long) format);
+ ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%lld'\n", (long long) format);
return NULL;
}
Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=239074&r1=239073&r2=239074
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Sun Jan 10 13:37:30 2010
@@ -1517,7 +1517,7 @@
for (x = 0; x < IAX_MAX_SHIFT; x++) {
if (subclass & (1LL << x)) {
if (power > -1) {
- ast_log(LOG_WARNING, "Can't compress subclass %Ld\n", (long long) subclass);
+ ast_log(LOG_WARNING, "Can't compress subclass %lld\n", (long long) subclass);
return 0;
} else
power = x;
Modified: trunk/main/frame.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/frame.c?view=diff&rev=239074&r1=239073&r2=239074
==============================================================================
--- trunk/main/frame.c (original)
+++ trunk/main/frame.c Sun Jan 10 13:37:30 2010
@@ -703,8 +703,8 @@
}
}
- snprintf(hex, sizeof(hex), "(0x%Lx)", 1LL << i);
- ast_cli(a->fd, "%19Lu (1 << %2d) %20s %5s %8s (%s)\n", 1LL << i, i, hex,
+ snprintf(hex, sizeof(hex), "(0x%llx)", 1LL << i);
+ ast_cli(a->fd, "%19llu (1 << %2d) %20s %5s %8s (%s)\n", 1LL << i, i, hex,
((1LL << i) & AST_FORMAT_AUDIO_MASK) ? "audio" :
i == 16 || i == 17 ? "image" :
((1LL << i) & AST_FORMAT_VIDEO_MASK) ? "video" :
@@ -741,7 +741,7 @@
if (a->argc != 4)
return CLI_SHOWUSAGE;
- if (sscanf(a->argv[3], "%30Ld", &type_punned_codec) != 1) {
+ if (sscanf(a->argv[3], "%30lld", &type_punned_codec) != 1) {
return CLI_SHOWUSAGE;
}
codec = type_punned_codec;
@@ -749,11 +749,11 @@
for (i = 0; i < 63; i++)
if (codec & (1LL << i)) {
found = 1;
- ast_cli(a->fd, "%11Lu (1 << %2d) %s\n", 1LL << i, i, ast_codec2str(1LL << i));
+ ast_cli(a->fd, "%11llu (1 << %2d) %s\n", 1LL << i, i, ast_codec2str(1LL << i));
}
if (!found)
- ast_cli(a->fd, "Codec %Ld not found\n", (long long) codec);
+ ast_cli(a->fd, "Codec %lld not found\n", (long long) codec);
return CLI_SUCCESS;
}
More information about the asterisk-commits
mailing list