[asterisk-commits] mnicholson: branch irroot/t38gateway-trunk r324466 - /team/irroot/t38gateway-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 22 08:26:28 CDT 2011


Author: mnicholson
Date: Wed Jun 22 08:26:25 2011
New Revision: 324466

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=324466
Log:
make sure the session does not disappear from underneath the gateway generator

Modified:
    team/irroot/t38gateway-trunk/res/res_fax_spandsp.c

Modified: team/irroot/t38gateway-trunk/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/res/res_fax_spandsp.c?view=diff&rev=324466&r1=324465&r2=324466
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_fax_spandsp.c (original)
+++ team/irroot/t38gateway-trunk/res/res_fax_spandsp.c Wed Jun 22 08:26:25 2011
@@ -644,7 +644,12 @@
  * \param params generator data
  * \return data to use in generator call*/
 static void *spandsp_fax_gw_gen_alloc(struct ast_channel *chan, void *params) {
+	ao2_ref(params, +1);
 	return params;
+}
+
+static void spandsp_fax_gw_gen_release(struct ast_channel *chan, void *data) {
+	ao2_ref(data, -1);
 }
 
 /*! \brief activate a spandsp gateway based on the information in the given fax session
@@ -657,6 +662,7 @@
 	struct ast_channel *peer;
 	static struct ast_generator t30_gen = {
 		alloc: spandsp_fax_gw_gen_alloc,
+		release: spandsp_fax_gw_gen_release,
 		generate: spandsp_fax_gw_t30_gen,
 	};
 




More information about the asterisk-commits mailing list