[svn-commits] mjordan: branch 11 r375798 - in /branches/11: ./ res/res_fax.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Nov 3 21:43:29 CDT 2012


Author: mjordan
Date: Sat Nov  3 21:43:25 2012
New Revision: 375798

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375798
Log:
Only deref a reserved gateway session if we actually reserved one

Its perfectly acceptable to have a gateway session unreserved when we go to
first allocate one.  Unreffing the reserved gateway session - when its NULL -
will result in an assertion error.

This problem was caught by the Asterisk Test Suite (once we had enough of the
debugging flags enabled)
........

Merged revisions 375797 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    branches/11/   (props changed)
    branches/11/res/res_fax.c

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

Modified: branches/11/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_fax.c?view=diff&rev=375798&r1=375797&r2=375798
==============================================================================
--- branches/11/res/res_fax.c (original)
+++ branches/11/res/res_fax.c Sat Nov  3 21:43:25 2012
@@ -2574,7 +2574,9 @@
 	}
 	/* release the reference for the reserved session and replace it with
 	 * the real session */
-	ao2_ref(gateway->s, -1);
+	if (gateway->s) {
+		ao2_ref(gateway->s, -1);
+	}
 	gateway->s = s;
 	gateway->token = NULL;
 




More information about the svn-commits mailing list