[Asterisk-cvs] asterisk/channels chan_agent.c,1.70,1.71 chan_h323.c,1.42,1.43

citats at lists.digium.com citats at lists.digium.com
Thu Apr 8 15:27:07 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/home/citats/cvs/asterisk/channels

Modified Files:
	chan_agent.c chan_h323.c 
Log Message:
Hopefully the last round of removing needlock stuff


Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- chan_agent.c	8 Apr 2004 19:19:24 -0000	1.70
+++ chan_agent.c	8 Apr 2004 19:28:05 -0000	1.71
@@ -383,16 +383,14 @@
 static int agent_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
 {
 	struct agent_pvt *p = newchan->pvt->pvt;
-	if (needlock)
-		ast_mutex_lock(&p->lock);
+	ast_mutex_lock(&p->lock);
 	if (p->owner != oldchan) {
 		ast_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, p->owner);
 		ast_mutex_unlock(&p->lock);
 		return -1;
 	}
 	p->owner = newchan;
-	if (needlock)
-		ast_mutex_unlock(&p->lock);
+	ast_mutex_unlock(&p->lock);
 	return 0;
 }
 

Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- chan_h323.c	8 Apr 2004 19:19:24 -0000	1.42
+++ chan_h323.c	8 Apr 2004 19:28:05 -0000	1.43
@@ -626,15 +626,13 @@
 {
 	struct oh323_pvt *p = newchan->pvt->pvt;
 
-	if (needlock)
-		ast_mutex_lock(&p->lock);
+	ast_mutex_lock(&p->lock);
 	if (p->owner != oldchan) {
 		ast_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, p->owner);
 		return -1;
 	}
 	p->owner = newchan;
-	if (needlock)
-		ast_mutex_unlock(&p->lock);
+	ast_mutex_unlock(&p->lock);
 	return 0;
 }
 




More information about the svn-commits mailing list