[asterisk-commits] jpeeler: trunk r217987 - in /trunk/channels: chan_dahdi.c sig_pri.c sig_pri.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 10 18:49:13 CDT 2009


Author: jpeeler
Date: Thu Sep 10 18:49:09 2009
New Revision: 217987

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=217987
Log:
Cleanup approach in 217804 and don't reach inside the sig_pvt.

Modified:
    trunk/channels/chan_dahdi.c
    trunk/channels/sig_pri.c
    trunk/channels/sig_pri.h

Modified: trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=217987&r1=217986&r2=217987
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Thu Sep 10 18:49:09 2009
@@ -6357,10 +6357,7 @@
 	} 
 #ifdef HAVE_PRI
 	else if (dahdi_sig_pri_lib_handles(p->sig)) {
-		struct sig_pri_chan *pchan = p->sig_pvt;
-		if (pchan->owner == oldchan) {
-			pchan->owner = newchan;
-		}
+		sig_pri_fixup(oldchan, newchan, p->sig_pvt);
 	}
 #endif
 

Modified: trunk/channels/sig_pri.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/sig_pri.c?view=diff&rev=217987&r1=217986&r2=217987
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Thu Sep 10 18:49:09 2009
@@ -3198,4 +3198,11 @@
 }
 #endif
 
+void sig_pri_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_pri_chan *pchan)
+{
+	if (pchan->owner == oldchan) {
+		pchan->owner = newchan;
+	}
+}
+
 #endif /* HAVE_PRI */

Modified: trunk/channels/sig_pri.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/sig_pri.h?view=diff&rev=217987&r1=217986&r2=217987
==============================================================================
--- trunk/channels/sig_pri.h (original)
+++ trunk/channels/sig_pri.h Thu Sep 10 18:49:09 2009
@@ -266,4 +266,6 @@
 int pri_maintenance_bservice(struct pri *pri, struct sig_pri_chan *p, int changestatus);
 #endif
 
+void sig_pri_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_pri_chan *pchan);
+
 #endif /* _SIG_PRI_H */




More information about the asterisk-commits mailing list