[asterisk-commits] russell: branch russell/chan_refcount r89708 - /team/russell/chan_refcount/ch...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 27 14:16:11 CST 2007


Author: russell
Date: Tue Nov 27 14:16:11 2007
New Revision: 89708

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89708
Log:
start removing some incomplete code that i don't want in here anymore ...

Modified:
    team/russell/chan_refcount/channels/chan_sip.c

Modified: team/russell/chan_refcount/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_sip.c?view=diff&rev=89708&r1=89707&r2=89708
==============================================================================
--- team/russell/chan_refcount/channels/chan_sip.c (original)
+++ team/russell/chan_refcount/channels/chan_sip.c Tue Nov 27 14:16:11 2007
@@ -3721,7 +3721,6 @@
 		p->owner->tech_pvt = NULL;
 		if (lockowner)
 			ast_channel_unlock(p->owner);
-		p->owner = ast_channel_unref(p->owner);
 	}
 	/* Clear history */
 	if (p->history) {
@@ -4090,7 +4089,7 @@
 		ast_clear_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER);	/* Really hang up next time */
 		p->needdestroy = 0;
 		p->owner->tech_pvt = dialog_unref(p->owner->tech_pvt);
-		p->owner = ast_channel_unref(p->owner);
+		p->owner = NULL;
 		return 0;
 	}
 
@@ -4130,7 +4129,7 @@
 	if (p->vad)
 		ast_dsp_free(p->vad);
 
-	p->owner = ast_channel_unref(p->owner);
+	p->owner = NULL;
 	ast->tech_pvt = dialog_unref(ast->tech_pvt);
 
 	ast_module_unref(ast_module_info->self);
@@ -4392,8 +4391,7 @@
 	if (p->owner != oldchan)
 		ast_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, p->owner);
 	else {
-		ast_channel_unref(oldchan);
-		p->owner = ast_channel_ref(newchan);
+		p->owner = newchan;
 		ret = 0;
 	}
 	ast_debug(3, "SIP Fixup: New owner for dialogue %s: %s (Old parent: %s)\n", p->callid, p->owner->name, oldchan->name);
@@ -4695,7 +4693,7 @@
 		tmp->amaflags = i->amaflags;
 	if (!ast_strlen_zero(i->language))
 		ast_string_field_set(tmp, language, i->language);
-	i->owner = ast_channel_ref(tmp);
+	i->owner = tmp;
 	ast_module_ref(ast_module_info->self);
 	ast_copy_string(tmp->context, i->context, sizeof(tmp->context));
 	/*Since it is valid to have extensions in the dialplan that have unescaped characters in them
@@ -7844,7 +7842,7 @@
 	add_header(&req, "Allow", ALLOWED_METHODS);
 	add_header(&req, "Supported", SUPPORTED_EXTENSIONS);
 	if (p->options && p->options->addsipheaders && p->owner) {
-		struct ast_channel *chan = ast_channel_ref(p->owner); /* The owner channel */
+		struct ast_channel *chan = p->owner; /* The owner channel */
 		struct varshead *headp;
 	
 		ast_channel_lock(chan);
@@ -7882,7 +7880,6 @@
 		}
 
 		ast_channel_unlock(chan);
-		ast_channel_unref(chan);
 	}
 	if (sdp) {
 		if (p->udptl && p->t38.state == T38_LOCAL_DIRECT) {




More information about the asterisk-commits mailing list