[asterisk-commits] file: branch file/sha256-a-harsh-reality r416994 - in /team/file/sha256-a-har...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jun 22 11:55:35 CDT 2014
Author: file
Date: Sun Jun 22 11:55:30 2014
New Revision: 416994
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=416994
Log:
Multiple revisions 416668,416733,416870,416930
........
r416668 | gtjoseph | 2014-06-19 13:02:12 -0300 (Thu, 19 Jun 2014) | 15 lines
Remove the problematic and unneeded AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c
AST_MODFLAG_GLOBAL_SYMBOLS was causing the module to be incorrectly loaded
before pbx_config. pbx_config was therefore blowing away contexts that were
created by pbx_lua. With AST_MODFLAG_DEFAULT the load order is now correct
and contexs are being properly merged. AST_MODFLAG_GLOBAL_SYMBOLS was not
needed anyway since no other modules needed its global symbols that early.
ASTERISK-23818 #close
Reported by: Dennis Guse
Tested by: Dennis Guse
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3629/
........
r416733 | kmoore | 2014-06-19 16:34:37 -0300 (Thu, 19 Jun 2014) | 5 lines
Fix build warnings with TEST_FRAMEWORK enabled
........
Merged revisions 416732 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
r416870 | gtjoseph | 2014-06-20 18:57:00 -0300 (Fri, 20 Jun 2014) | 21 lines
build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib. For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes. They're in
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.
The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.
This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.
Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/
........
r416930 | gtjoseph | 2014-06-20 20:14:52 -0300 (Fri, 20 Jun 2014) | 27 lines
build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib. For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes. They're in
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.
The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.
This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.
A regenerated ./configure and include/asterisk/autoconfig.h.in are included
but can be regenerated by running ./bootstrap.sh at any time.
Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/
........
Merged revisions 416929 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 416668,416733,416870,416930 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
team/file/sha256-a-harsh-reality/ (props changed)
team/file/sha256-a-harsh-reality/autoconf/ast_ext_tool_check.m4
team/file/sha256-a-harsh-reality/channels/sip/reqresp_parser.c
team/file/sha256-a-harsh-reality/configure
team/file/sha256-a-harsh-reality/include/asterisk/autoconfig.h.in
team/file/sha256-a-harsh-reality/main/bridging.c
team/file/sha256-a-harsh-reality/main/logger.c
team/file/sha256-a-harsh-reality/main/test.c
team/file/sha256-a-harsh-reality/pbx/pbx_lua.c
Propchange: team/file/sha256-a-harsh-reality/
------------------------------------------------------------------------------
automerge = *
Propchange: team/file/sha256-a-harsh-reality/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/file/sha256-a-harsh-reality/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Jun 22 11:55:30 2014
@@ -1,1 +1,1 @@
-/branches/11:1-416634
+/branches/11:1-416993
Modified: team/file/sha256-a-harsh-reality/autoconf/ast_ext_tool_check.m4
URL: http://svnview.digium.com/svn/asterisk/team/file/sha256-a-harsh-reality/autoconf/ast_ext_tool_check.m4?view=diff&rev=416994&r1=416993&r2=416994
==============================================================================
--- team/file/sha256-a-harsh-reality/autoconf/ast_ext_tool_check.m4 (original)
+++ team/file/sha256-a-harsh-reality/autoconf/ast_ext_tool_check.m4 Sun Jun 22 11:55:30 2014
@@ -5,39 +5,37 @@
# AST_EXT_TOOL_CHECK([package], [tool name], [--cflags], [--libs], [includes], [expression])
AC_DEFUN([AST_EXT_TOOL_CHECK],
[
- if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
- PBX_$1=0
- AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])
- if test ! "x${CONFIG_$1}" = xNo; then
- if test x"$3" = x ; then A=--cflags ; else A="$3" ; fi
- $1_INCLUDE=$(${CONFIG_$1} $A)
- if test x"$4" = x ; then A=--libs ; else A="$4" ; fi
- $1_LIB=$(${CONFIG_$1} $A)
- if test x"$5" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${$1_DIR}" != "x"; then
- $1_INCLUDE="-I${$1_DIR}/include"
+ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
+ PBX_$1=0
+ AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])
+ if test ! "x${CONFIG_$1}" = xNo; then
+ if test x"$3" = x ; then A=--cflags ; else A="$3" ; fi
+ $1_INCLUDE=$(${CONFIG_$1} $A)
+ $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g")
+
+ if test x"$4" = x ; then A=--libs ; else A="$4" ; fi
+ $1_LIB=$(${CONFIG_$1} $A)
+ $1_LIB=$(echo ${$1_LIB} | $SED -e "s|-L|-L${$1_DIR}|g")
+
+ if test x"$5" != x ; then
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
+
+ saved_libs="${LIBS}"
+ LIBS=${$1_LIB}
+
+ AC_LINK_IFELSE(
+ [ AC_LANG_PROGRAM( [ $5 ], [ $6; ])],
+ [ PBX_$1=1 AC_DEFINE([HAVE_$1], 1,
+ [Define if your system has the $1 headers.])],
+ []
+ )
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_$1=1
+ AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])
+ fi
fi
- CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
-
- saved_libs="${LIBS}"
- LIBS="${$1_LIB}"
-
- AC_LINK_IFELSE(
- [ AC_LANG_PROGRAM( [ $5 ],
- [ $6; ]
- )],
- [ PBX_$1=1
- AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
- ],
- []
- )
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_$1=1
- AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])
- fi
fi
- fi
])
Modified: team/file/sha256-a-harsh-reality/channels/sip/reqresp_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/file/sha256-a-harsh-reality/channels/sip/reqresp_parser.c?view=diff&rev=416994&r1=416993&r2=416994
==============================================================================
--- team/file/sha256-a-harsh-reality/channels/sip/reqresp_parser.c (original)
+++ team/file/sha256-a-harsh-reality/channels/sip/reqresp_parser.c Sun Jun 22 11:55:30 2014
@@ -2489,8 +2489,8 @@
if (testdataptr->expected_port && testdataptr->expected_port != via->port) {
ast_test_status_update(test, "TEST#%d FAILED: VIA = \"%s\"\n"
- "parsed port = \"%d\"\n"
- "expected = \"%d\"\n"
+ "parsed port = \"%u\"\n"
+ "expected = \"%u\"\n"
"failed to parse port\n",
i, testdataptr->in, via->port, testdataptr->expected_port);
res = AST_TEST_FAIL;
Modified: team/file/sha256-a-harsh-reality/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/file/sha256-a-harsh-reality/include/asterisk/autoconfig.h.in?view=diff&rev=416994&r1=416993&r2=416994
==============================================================================
--- team/file/sha256-a-harsh-reality/include/asterisk/autoconfig.h.in (original)
+++ team/file/sha256-a-harsh-reality/include/asterisk/autoconfig.h.in Sun Jun 22 11:55:30 2014
@@ -1248,6 +1248,11 @@
/* Define to 1 if running on Darwin. */
#undef _DARWIN_UNLIMITED_SELECT
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
Modified: team/file/sha256-a-harsh-reality/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/file/sha256-a-harsh-reality/main/bridging.c?view=diff&rev=416994&r1=416993&r2=416994
==============================================================================
--- team/file/sha256-a-harsh-reality/main/bridging.c (original)
+++ team/file/sha256-a-harsh-reality/main/bridging.c Sun Jun 22 11:55:30 2014
@@ -1540,7 +1540,7 @@
cleanup_video_mode(bridge);
bridge->video_mode.mode = AST_BRIDGE_VIDEO_MODE_SINGLE_SRC;
bridge->video_mode.mode_data.single_src_data.chan_vsrc = ast_channel_ref(video_src_chan);
- ast_test_suite_event_notify("BRIDGE_VIDEO_MODE", "Message: video mode set to single source\r\nVideo Mode: %d\r\nVideo Channel: %s", bridge->video_mode.mode, ast_channel_name(video_src_chan));
+ ast_test_suite_event_notify("BRIDGE_VIDEO_MODE", "Message: video mode set to single source\r\nVideo Mode: %u\r\nVideo Channel: %s", bridge->video_mode.mode, ast_channel_name(video_src_chan));
ast_indicate(video_src_chan, AST_CONTROL_VIDUPDATE);
ao2_unlock(bridge);
}
@@ -1550,7 +1550,7 @@
ao2_lock(bridge);
cleanup_video_mode(bridge);
bridge->video_mode.mode = AST_BRIDGE_VIDEO_MODE_TALKER_SRC;
- ast_test_suite_event_notify("BRIDGE_VIDEO_MODE", "Message: video mode set to talker source\r\nVideo Mode: %d", bridge->video_mode.mode);
+ ast_test_suite_event_notify("BRIDGE_VIDEO_MODE", "Message: video mode set to talker source\r\nVideo Mode: %u", bridge->video_mode.mode);
ao2_unlock(bridge);
}
Modified: team/file/sha256-a-harsh-reality/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/team/file/sha256-a-harsh-reality/main/logger.c?view=diff&rev=416994&r1=416993&r2=416994
==============================================================================
--- team/file/sha256-a-harsh-reality/main/logger.c (original)
+++ team/file/sha256-a-harsh-reality/main/logger.c Sun Jun 22 11:55:30 2014
@@ -1327,7 +1327,7 @@
call->call_identifier = ast_atomic_fetchadd_int(&next_unique_callid, +1);
#ifdef TEST_FRAMEWORK
- ast_debug(3, "CALL_ID [C-%08x] created by thread.\n", call->call_identifier);
+ ast_debug(3, "CALL_ID [C-%08x] created by thread.\n", (unsigned)call->call_identifier);
#endif
return call;
}
@@ -1357,7 +1357,7 @@
if (*id && (*id != callid)) {
#ifdef TEST_FRAMEWORK
- ast_debug(3, "CALL_ID [C-%08x] being removed from thread.\n", (*id)->call_identifier);
+ ast_debug(3, "CALL_ID [C-%08x] being removed from thread.\n", (unsigned)(*id)->call_identifier);
#endif
*id = ast_callid_unref(*id);
*id = NULL;
@@ -1368,7 +1368,7 @@
ast_callid_ref(callid);
*id = callid;
#ifdef TEST_FRAMEWORK
- ast_debug(3, "CALL_ID [C-%08x] bound to thread.\n", callid->call_identifier);
+ ast_debug(3, "CALL_ID [C-%08x] bound to thread.\n", (unsigned)callid->call_identifier);
#endif
}
@@ -1390,7 +1390,7 @@
ast_callid_ref(callid);
*pointing = callid;
#ifdef TEST_FRAMEWORK
- ast_debug(3, "CALL_ID [C-%08x] bound to thread.\n", callid->call_identifier);
+ ast_debug(3, "CALL_ID [C-%08x] bound to thread.\n", (unsigned)callid->call_identifier);
#endif
} else {
ast_log(LOG_WARNING, "Attempted to ast_callid_threadassoc_add on thread already associated with a callid.\n");
@@ -1415,7 +1415,7 @@
return -1;
} else {
#ifdef TEST_FRAMEWORK
- ast_debug(3, "Call_ID [C-%08x] being removed from thread.\n", (*pointing)->call_identifier);
+ ast_debug(3, "Call_ID [C-%08x] being removed from thread.\n", (unsigned)(*pointing)->call_identifier);
#endif
*pointing = ast_callid_unref(*pointing);
return 0;
Modified: team/file/sha256-a-harsh-reality/main/test.c
URL: http://svnview.digium.com/svn/asterisk/team/file/sha256-a-harsh-reality/main/test.c?view=diff&rev=416994&r1=416993&r2=416994
==============================================================================
--- team/file/sha256-a-harsh-reality/main/test.c (original)
+++ team/file/sha256-a-harsh-reality/main/test.c Sun Jun 22 11:55:30 2014
@@ -185,7 +185,7 @@
return;
}
- fprintf(f, "\t<testcase time=\"%d.%d\" name=\"%s%s\"%s>\n",
+ fprintf(f, "\t<testcase time=\"%u.%u\" name=\"%s%s\"%s>\n",
test->time / 1000, test->time % 1000,
test->info.category, test->info.name,
test->state == AST_TEST_PASS ? "/" : "");
@@ -210,7 +210,7 @@
fprintf(f, "Description: %s\n", test->info.description);
fprintf(f, "Result: %s\n", test_result2str[test->state]);
if (test->state != AST_TEST_NOT_RUN) {
- fprintf(f, "Time: %d\n", test->time);
+ fprintf(f, "Time: %u\n", test->time);
}
if (test->state == AST_TEST_FAIL) {
fprintf(f, "Error Description: %s\n\n", S_OR(ast_str_buffer(test->status_str), "NA"));
@@ -296,7 +296,7 @@
(test->state == AST_TEST_FAIL) ? COLOR_RED : COLOR_GREEN,
0,
sizeof(result_buf));
- ast_cli(cli->fd, "END %s - %s Time: %s%dms Result: %s\n",
+ ast_cli(cli->fd, "END %s - %s Time: %s%ums Result: %s\n",
test->info.category,
test->info.name,
test->time ? "" : "<",
@@ -385,7 +385,7 @@
* http://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo
*/
fprintf(f_xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- fprintf(f_xml, "<testsuite errors=\"0\" time=\"%d.%d\" tests=\"%d\" "
+ fprintf(f_xml, "<testsuite errors=\"0\" time=\"%u.%u\" tests=\"%u\" "
"name=\"AsteriskUnitTests\">\n",
last_results.total_time / 1000, last_results.total_time % 1000,
last_results.total_tests);
@@ -398,11 +398,11 @@
if (f_txt) {
fprintf(f_txt, "Asterisk Version: %s\n", ast_get_version());
fprintf(f_txt, "Asterisk Version Number: %s\n", ast_get_version_num());
- fprintf(f_txt, "Number of Tests: %d\n", last_results.total_tests);
- fprintf(f_txt, "Number of Tests Executed: %d\n", (last_results.total_passed + last_results.total_failed));
- fprintf(f_txt, "Passed Tests: %d\n", last_results.total_passed);
- fprintf(f_txt, "Failed Tests: %d\n", last_results.total_failed);
- fprintf(f_txt, "Total Execution Time: %d\n", last_results.total_time);
+ fprintf(f_txt, "Number of Tests: %u\n", last_results.total_tests);
+ fprintf(f_txt, "Number of Tests Executed: %u\n", (last_results.total_passed + last_results.total_failed));
+ fprintf(f_txt, "Passed Tests: %u\n", last_results.total_passed);
+ fprintf(f_txt, "Failed Tests: %u\n", last_results.total_failed);
+ fprintf(f_txt, "Total Execution Time: %u\n", last_results.total_time);
}
/* export each individual test */
@@ -728,7 +728,7 @@
if (!(last_results.last_passed + last_results.last_failed)) {
ast_cli(a->fd, "--- No Tests Found! ---\n");
}
- ast_cli(a->fd, "\n%d Test(s) Executed %d Passed %d Failed\n",
+ ast_cli(a->fd, "\n%u Test(s) Executed %u Passed %u Failed\n",
(last_results.last_passed + last_results.last_failed),
last_results.last_passed,
last_results.last_failed);
Modified: team/file/sha256-a-harsh-reality/pbx/pbx_lua.c
URL: http://svnview.digium.com/svn/asterisk/team/file/sha256-a-harsh-reality/pbx/pbx_lua.c?view=diff&rev=416994&r1=416993&r2=416994
==============================================================================
--- team/file/sha256-a-harsh-reality/pbx/pbx_lua.c (original)
+++ team/file/sha256-a-harsh-reality/pbx/pbx_lua.c Sun Jun 22 11:55:30 2014
@@ -1637,6 +1637,9 @@
res = AST_MODULE_LOAD_DECLINE;
}
+ if (!res) {
+ ast_log(LOG_NOTICE, "Lua PBX Switch loaded.\n");
+ }
lua_close(L);
return res;
}
@@ -1646,6 +1649,7 @@
ast_context_destroy(NULL, registrar);
ast_unregister_switch(&lua_switch);
lua_free_extensions();
+ ast_log(LOG_NOTICE, "Lua PBX Switch unloaded.\n");
return 0;
}
@@ -1669,7 +1673,7 @@
return AST_MODULE_LOAD_SUCCESS;
}
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Lua PBX Switch",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Lua PBX Switch",
.load = load_module,
.unload = unload_module,
.reload = reload,
More information about the asterisk-commits
mailing list