[asterisk-commits] file: trunk r380407 - in /trunk: main/sorcery.c tests/test_sorcery.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 29 14:19:32 CST 2013
Author: file
Date: Tue Jan 29 14:19:28 2013
New Revision: 380407
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380407
Log:
Fix an issue where building with DEBUG_FD_LEAKS enabled would not work due to sorcery using calls called "open" and "close".
Modified:
trunk/main/sorcery.c
trunk/tests/test_sorcery.c
Modified: trunk/main/sorcery.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/sorcery.c?view=diff&rev=380407&r1=380406&r2=380407
==============================================================================
--- trunk/main/sorcery.c (original)
+++ trunk/main/sorcery.c Tue Jan 29 14:19:28 2013
@@ -39,6 +39,10 @@
#include "asterisk/netsock2.h"
#include "asterisk/module.h"
+/* To prevent DEBUG_FD_LEAKS from interfering with things we undef open and close */
+#undef open
+#undef close
+
/*! \brief Number of buckets for wizards (should be prime for performance reasons) */
#define WIZARD_BUCKETS 7
Modified: trunk/tests/test_sorcery.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_sorcery.c?view=diff&rev=380407&r1=380406&r2=380407
==============================================================================
--- trunk/tests/test_sorcery.c (original)
+++ trunk/tests/test_sorcery.c Tue Jan 29 14:19:28 2013
@@ -195,7 +195,7 @@
return AST_TEST_PASS;
}
-AST_TEST_DEFINE(open)
+AST_TEST_DEFINE(sorcery_open)
{
RAII_VAR(struct ast_sorcery *, sorcery, NULL, ast_sorcery_unref);
@@ -1937,7 +1937,7 @@
static int unload_module(void)
{
AST_TEST_UNREGISTER(wizard_registration);
- AST_TEST_UNREGISTER(open);
+ AST_TEST_UNREGISTER(sorcery_open);
AST_TEST_UNREGISTER(apply_default);
AST_TEST_UNREGISTER(apply_config);
AST_TEST_UNREGISTER(object_register);
@@ -1976,7 +1976,7 @@
static int load_module(void)
{
AST_TEST_REGISTER(wizard_registration);
- AST_TEST_REGISTER(open);
+ AST_TEST_REGISTER(sorcery_open);
AST_TEST_REGISTER(apply_default);
AST_TEST_REGISTER(apply_config);
AST_TEST_REGISTER(object_register);
More information about the asterisk-commits
mailing list