[asterisk-commits] seanbright: branch 10 r355467 - in /branches/10: ./ channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 15 12:23:00 CST 2012


Author: seanbright
Date: Wed Feb 15 12:22:56 2012
New Revision: 355467

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=355467
Log:
Only use maxtrunkcall and maxnontrunkcall in chan_iax2 if IAX_OLD_FIND is specified.

These variables are only accessed from the IAX_OLD_FIND path, so there is no reason
to keep them updated otherwise.
........

Merged revisions 355458 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/channels/chan_iax2.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_iax2.c?view=diff&rev=355467&r1=355466&r2=355467
==============================================================================
--- branches/10/channels/chan_iax2.c (original)
+++ branches/10/channels/chan_iax2.c Wed Feb 15 12:22:56 2012
@@ -1161,9 +1161,6 @@
 	ast_verbose("%s", buf);
 }
 
-static int maxtrunkcall = TRUNK_CALL_START;
-static int maxnontrunkcall = 1;
-
 static enum ast_bridge_result iax2_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int timeoutms);
 static int expire_registry(const void *data);
 static int iax2_answer(struct ast_channel *c);
@@ -2081,7 +2078,15 @@
 	return 0;
 }
 
-static void update_max_trunk(void)
+#ifdef IAX_OLD_FIND
+
+static int maxtrunkcall = TRUNK_CALL_START;
+static int maxnontrunkcall = 1;
+
+#define update_max_trunk() __update_max_trunk()
+#define update_max_nontrunk() __update_max_nontrunk()
+
+static void __update_max_trunk(void)
 {
 	int max = TRUNK_CALL_START;
 	int x;
@@ -2098,7 +2103,7 @@
 		ast_debug(1, "New max trunk callno is %d\n", max);
 }
 
-static void update_max_nontrunk(void)
+static void __update_max_nontrunk(void)
 {
 	int max = 1;
 	int x;
@@ -2111,6 +2116,13 @@
 	if (iaxdebug)
 		ast_debug(1, "New max nontrunk callno is %d\n", max);
 }
+
+#else
+
+#define update_max_trunk() do { } while (0)
+#define update_max_nontrunk() do { } while (0)
+
+#endif
 
 static int make_trunk(unsigned short callno, int locked)
 {




More information about the asterisk-commits mailing list