[asterisk-commits] branch oej/siptransfer r18970 - in /team/oej/siptransfer: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Apr 10 14:18:06 MST 2006


Author: oej
Date: Mon Apr 10 16:18:03 2006
New Revision: 18970

URL: http://svn.digium.com/view/asterisk?rev=18970&view=rev
Log:
Reset automerge

Modified:
    team/oej/siptransfer/   (props changed)
    team/oej/siptransfer/channels/chan_sip.c

Propchange: team/oej/siptransfer/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/siptransfer/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Apr 10 16:18:03 2006
@@ -1,1 +1,1 @@
-/trunk:1-18938
+/trunk:1-18969

Modified: team/oej/siptransfer/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/channels/chan_sip.c?rev=18970&r1=18969&r2=18970&view=diff
==============================================================================
--- team/oej/siptransfer/channels/chan_sip.c (original)
+++ team/oej/siptransfer/channels/chan_sip.c Mon Apr 10 16:18:03 2006
@@ -2917,13 +2917,13 @@
 static int sip_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
 {
 	int ret = -1;
-	struct sip_pvt *p = newchan->tech_pvt;
-
-	if (!p) {
+	struct sip_pvt *p;
+
+	if (!newchan || !newchan->tech_pvt) {
 		ast_log(LOG_WARNING, "No SIP tech_pvt! Fixup of %s failed.\n", oldchan->name);
-		ast_mutex_unlock(&p->lock);
 		return -1;
 	}
+	p = newchan->tech_pvt;
 
 	ast_mutex_lock(&p->lock);
 	append_history(p, "Masq", "Old channel: %s\n", oldchan->name);
@@ -2932,6 +2932,7 @@
 		ast_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, p->owner);
 	else {
 		p->owner = newchan;
+		append_history(p, "Masq", "Old channel: %s\n", oldchan->name);
 		ret = 0;
 	}
 	if (option_debug > 2)



More information about the asterisk-commits mailing list