aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-01 20:29:53 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-01 20:29:53 +0000
commita413a171faf64274994f654d27fe70dbf349c4b2 (patch)
treedea047e1709fc32663acac2f04782fd0d5519dc9
parent8b2c9fb421cf63a2cec212d0a344953b3a1cf066 (diff)
Merged revisions 127143 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r127143 | tilghman | 2008-07-01 15:28:54 -0500 (Tue, 01 Jul 2008) | 10 lines Merged revisions 127133 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r127133 | tilghman | 2008-07-01 15:25:37 -0500 (Tue, 01 Jul 2008) | 2 lines Disable the old, slow search for matching callno in chan_iax2 (but allow it to be reenabled for debugging) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@127149 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--build_tools/cflags.xml2
-rw-r--r--channels/chan_iax2.c13
2 files changed, 15 insertions, 0 deletions
diff --git a/build_tools/cflags.xml b/build_tools/cflags.xml
index 776160bb6..8baed797b 100644
--- a/build_tools/cflags.xml
+++ b/build_tools/cflags.xml
@@ -46,4 +46,6 @@
<member name="BUSYDETECT_DEBUG" displayname="Enable additional busy detection debugging">
<defaultenabled>no</defaultenabled>
</member>
+ <member name="IAX_OLD_FIND" displayname="Use the old, slow method of searching for IAX callnos">
+ </member>
</category>
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 335a1bb8f..87b058b9d 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -1650,6 +1650,18 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s
return res;
}
+#ifdef IAX_OLD_FIND
+ /* If we get here, we SHOULD NOT find a call structure for this
+ callno; if we do, it means that there is a call structure that
+ has a peer callno but did NOT get entered into the hash table,
+ which is bad.
+
+ If we find a call structure using this old, slow method, output a log
+ message so we'll know about it. After a few months of leaving this in
+ place, if we don't hear about people seeing these messages, we can
+ remove this code for good.
+ */
+
for (x = 1; !res && x < maxnontrunkcall; x++) {
ast_mutex_lock(&iaxsl[x]);
if (iaxs[x]) {
@@ -1672,6 +1684,7 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s
if (!res || !return_locked)
ast_mutex_unlock(&iaxsl[x]);
}
+#endif
}
if (!res && (new >= NEW_ALLOW)) {
int start, found = 0;