[asterisk-commits] dlee: branch dlee/ASTERISK-22455-deadlock r398275 - /team/dlee/ASTERISK-22455...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 4 11:35:28 CDT 2013
Author: dlee
Date: Wed Sep 4 11:35:26 2013
New Revision: 398275
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398275
Log:
Fix module load issues with test_ari_model.so
Modified:
team/dlee/ASTERISK-22455-deadlock/tests/test_ari_model.c
Modified: team/dlee/ASTERISK-22455-deadlock/tests/test_ari_model.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-22455-deadlock/tests/test_ari_model.c?view=diff&rev=398275&r1=398274&r2=398275
==============================================================================
--- team/dlee/ASTERISK-22455-deadlock/tests/test_ari_model.c (original)
+++ team/dlee/ASTERISK-22455-deadlock/tests/test_ari_model.c Wed Sep 4 11:35:26 2013
@@ -365,6 +365,15 @@
return test_res;
}
+/*!
+ * \brief You can't RTLD_LAZY load function pointers, so we use this function
+ * wrapper instead.
+ */
+static int validate_int_fn(struct ast_json *json)
+{
+ return ast_ari_validate_int(json);
+}
+
AST_TEST_DEFINE(validate_list)
{
RAII_VAR(struct ast_json *, uut, NULL, ast_json_unref);
@@ -386,17 +395,17 @@
uut = ast_json_array_create();
ast_test_validate(test, NULL != uut);
ast_test_validate(test, ast_ari_validate_list(uut, ast_ari_validate_string));
- ast_test_validate(test, ast_ari_validate_list(uut, ast_ari_validate_int));
+ ast_test_validate(test, ast_ari_validate_list(uut, validate_int_fn));
res = ast_json_array_append(uut, ast_json_string_create(""));
ast_test_validate(test, 0 == res);
ast_test_validate(test, ast_ari_validate_list(uut, ast_ari_validate_string));
- ast_test_validate(test, !ast_ari_validate_list(uut, ast_ari_validate_int));
+ ast_test_validate(test, !ast_ari_validate_list(uut, validate_int_fn));
res = ast_json_array_append(uut, ast_json_integer_create(0));
ast_test_validate(test, 0 == res);
ast_test_validate(test, !ast_ari_validate_list(uut, ast_ari_validate_string));
- ast_test_validate(test, !ast_ari_validate_list(uut, ast_ari_validate_int));
+ ast_test_validate(test, !ast_ari_validate_list(uut, validate_int_fn));
ast_test_validate(test,
!ast_ari_validate_list(ast_json_null(), ast_ari_validate_string));
More information about the asterisk-commits
mailing list