[asterisk-commits] file: branch 1.4 r49568 - /branches/1.4/channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jan 4 16:00:51 MST 2007


Author: file
Date: Thu Jan  4 17:00:50 2007
New Revision: 49568

URL: http://svn.digium.com/view/asterisk?view=rev&rev=49568
Log:
It's possible for the iax2 pvt to disappear, so if it has... don't bother looking for dpentries.

Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=49568&r1=49567&r2=49568
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Thu Jan  4 17:00:50 2007
@@ -7023,15 +7023,17 @@
 						}
 					}
 				}
-				ast_mutex_lock(&dpcache_lock);
-				dp = iaxs[fr->callno]->dpentries;
-				while(dp) {
-					if (!(dp->flags & CACHE_FLAG_TRANSMITTED)) {
-						iax2_dprequest(dp, fr->callno);
+				if (iaxs[fr->callno]) {
+					ast_mutex_lock(&dpcache_lock);
+					dp = iaxs[fr->callno]->dpentries;
+					while(dp) {
+						if (!(dp->flags & CACHE_FLAG_TRANSMITTED)) {
+							iax2_dprequest(dp, fr->callno);
+						}
+						dp = dp->peer;
 					}
-					dp = dp->peer;
+					ast_mutex_unlock(&dpcache_lock);
 				}
-				ast_mutex_unlock(&dpcache_lock);
 				break;
 			case IAX_COMMAND_POKE:
 				/* Send back a pong packet with the original timestamp */



More information about the asterisk-commits mailing list