[asterisk-commits] dlee: branch dlee/ASTERISK-22451-ari-subscribe r399223 - in /team/dlee/ASTERI...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 17 09:27:20 CDT 2013


Author: dlee
Date: Tue Sep 17 09:27:17 2013
New Revision: 399223

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399223
Log:
Merged revisions 399160-399207 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    team/dlee/ASTERISK-22451-ari-subscribe/   (props changed)
    team/dlee/ASTERISK-22451-ari-subscribe/apps/app_speech_utils.c
    team/dlee/ASTERISK-22451-ari-subscribe/channels/chan_iax2.c
    team/dlee/ASTERISK-22451-ari-subscribe/res/res_speech.exports.in
    team/dlee/ASTERISK-22451-ari-subscribe/tests/test_ari_model.c

Propchange: team/dlee/ASTERISK-22451-ari-subscribe/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/dlee/ASTERISK-22451-ari-subscribe/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Sep 17 09:27:17 2013
@@ -1,1 +1,1 @@
-/branches/12:1-399155
+/branches/12:1-399222

Modified: team/dlee/ASTERISK-22451-ari-subscribe/apps/app_speech_utils.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-22451-ari-subscribe/apps/app_speech_utils.c?view=diff&rev=399223&r1=399222&r2=399223
==============================================================================
--- team/dlee/ASTERISK-22451-ari-subscribe/apps/app_speech_utils.c (original)
+++ team/dlee/ASTERISK-22451-ari-subscribe/apps/app_speech_utils.c Tue Sep 17 09:27:17 2013
@@ -27,6 +27,7 @@
 
 /*** MODULEINFO
 	<support_level>core</support_level>
+	<depend>res_speech</depend>
  ***/
 
 #include "asterisk.h"

Modified: team/dlee/ASTERISK-22451-ari-subscribe/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-22451-ari-subscribe/channels/chan_iax2.c?view=diff&rev=399223&r1=399222&r2=399223
==============================================================================
--- team/dlee/ASTERISK-22451-ari-subscribe/channels/chan_iax2.c (original)
+++ team/dlee/ASTERISK-22451-ari-subscribe/channels/chan_iax2.c Tue Sep 17 09:27:17 2013
@@ -8720,6 +8720,22 @@
 		}
 	}
 
+	/* treat an unspecified refresh interval as the minimum */
+	if (!refresh) {
+		refresh = min_reg_expire;
+	}
+	if (refresh > max_reg_expire) {
+		ast_log(LOG_NOTICE, "Restricting registration for peer '%s' to %d seconds (requested %d)\n",
+			p->name, max_reg_expire, refresh);
+		p->expiry = max_reg_expire;
+	} else if (refresh < min_reg_expire) {
+		ast_log(LOG_NOTICE, "Restricting registration for peer '%s' to %d seconds (requested %d)\n",
+			p->name, min_reg_expire, refresh);
+		p->expiry = min_reg_expire;
+	} else {
+		p->expiry = refresh;
+	}
+
 	if (ast_sockaddr_cmp(&p->addr, &sockaddr)) {
 		RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 
@@ -8783,20 +8799,7 @@
 			peer_unref(p);
 		}
 	}
-	/* treat an unspecified refresh interval as the minimum */
-	if (!refresh)
-		refresh = min_reg_expire;
-	if (refresh > max_reg_expire) {
-		ast_log(LOG_NOTICE, "Restricting registration for peer '%s' to %d seconds (requested %d)\n",
-			p->name, max_reg_expire, refresh);
-		p->expiry = max_reg_expire;
-	} else if (refresh < min_reg_expire) {
-		ast_log(LOG_NOTICE, "Restricting registration for peer '%s' to %d seconds (requested %d)\n",
-			p->name, min_reg_expire, refresh);
-		p->expiry = min_reg_expire;
-	} else {
-		p->expiry = refresh;
-	}
+
 	if (p->expiry && sin->sin_addr.s_addr) {
 		p->expire = iax2_sched_add(sched, (p->expiry + 10) * 1000, expire_registry, peer_ref(p));
 		if (p->expire == -1)

Modified: team/dlee/ASTERISK-22451-ari-subscribe/res/res_speech.exports.in
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-22451-ari-subscribe/res/res_speech.exports.in?view=diff&rev=399223&r1=399222&r2=399223
==============================================================================
--- team/dlee/ASTERISK-22451-ari-subscribe/res/res_speech.exports.in (original)
+++ team/dlee/ASTERISK-22451-ari-subscribe/res/res_speech.exports.in Tue Sep 17 09:27:17 2013
@@ -1,21 +1,6 @@
 {
 	global:
-		LINKER_SYMBOL_PREFIXast_speech_change;
-		LINKER_SYMBOL_PREFIXast_speech_change_results_type;
-		LINKER_SYMBOL_PREFIXast_speech_change_state;
-		LINKER_SYMBOL_PREFIXast_speech_destroy;
-		LINKER_SYMBOL_PREFIXast_speech_dtmf;
-		LINKER_SYMBOL_PREFIXast_speech_grammar_activate;
-		LINKER_SYMBOL_PREFIXast_speech_grammar_deactivate;
-		LINKER_SYMBOL_PREFIXast_speech_grammar_load;
-		LINKER_SYMBOL_PREFIXast_speech_grammar_unload;
-		LINKER_SYMBOL_PREFIXast_speech_new;
-		LINKER_SYMBOL_PREFIXast_speech_register;
-		LINKER_SYMBOL_PREFIXast_speech_results_free;
-		LINKER_SYMBOL_PREFIXast_speech_results_get;
-		LINKER_SYMBOL_PREFIXast_speech_start;
-		LINKER_SYMBOL_PREFIXast_speech_unregister;
-		LINKER_SYMBOL_PREFIXast_speech_write;
+		LINKER_SYMBOL_PREFIXast_*;
 	local:
 		*;
 };

Modified: team/dlee/ASTERISK-22451-ari-subscribe/tests/test_ari_model.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-22451-ari-subscribe/tests/test_ari_model.c?view=diff&rev=399223&r1=399222&r2=399223
==============================================================================
--- team/dlee/ASTERISK-22451-ari-subscribe/tests/test_ari_model.c (original)
+++ team/dlee/ASTERISK-22451-ari-subscribe/tests/test_ari_model.c Tue Sep 17 09:27:17 2013
@@ -37,6 +37,32 @@
 #include "asterisk/module.h"
 #include "asterisk/test.h"
 #include "../res/ari/ari_model_validators.h"
+
+#if defined(TEST_FRAMEWORK)
+/*!
+ * Wrapper of ast_test_validate_int() so an external function pointer is not used.
+ *
+ * \note Must do this because using an external function pointer
+ * does not play nicely when loading with RTLD_LAZY.
+ */
+static int wrap_ast_ari_validate_int(struct ast_json *json)
+{
+	return ast_ari_validate_int(json);
+}
+#endif	/* defined(TEST_FRAMEWORK) */
+
+#if defined(TEST_FRAMEWORK)
+/*!
+ * Wrapper of ast_ari_validate_string() so an external function pointer is not used.
+ *
+ * \note Must do this because using an external function pointer
+ * does not play nicely when loading with RTLD_LAZY.
+ */
+static int wrap_ast_ari_validate_string(struct ast_json *json)
+{
+	return ast_ari_validate_string(json);
+}
+#endif	/* defined(TEST_FRAMEWORK) */
 
 AST_TEST_DEFINE(validate_byte)
 {
@@ -385,21 +411,21 @@
 
 	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, wrap_ast_ari_validate_string));
+	ast_test_validate(test, ast_ari_validate_list(uut, wrap_ast_ari_validate_int));
 
 	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, wrap_ast_ari_validate_string));
+	ast_test_validate(test, !ast_ari_validate_list(uut, wrap_ast_ari_validate_int));
 
 	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, wrap_ast_ari_validate_string));
+	ast_test_validate(test, !ast_ari_validate_list(uut, wrap_ast_ari_validate_int));
 
 	ast_test_validate(test,
-		!ast_ari_validate_list(ast_json_null(), ast_ari_validate_string));
+		!ast_ari_validate_list(ast_json_null(), wrap_ast_ari_validate_string));
 
 	return AST_TEST_PASS;
 }




More information about the asterisk-commits mailing list