Hopefully the last round of removing needlock stuff
authorJames Golovich <james@gnuinter.net>
Thu, 8 Apr 2004 19:28:05 +0000 (19:28 +0000)
committerJames Golovich <james@gnuinter.net>
Thu, 8 Apr 2004 19:28:05 +0000 (19:28 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2663 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c
channels/chan_h323.c

index c12a858..f5c4e3a 100755 (executable)
@@ -383,16 +383,14 @@ static int agent_write(struct ast_channel *ast, struct ast_frame *f)
 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 ca68cb6..b29f697 100755 (executable)
@@ -626,15 +626,13 @@ static int oh323_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
 {
        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;
 }