mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Lock on indication too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -3855,7 +3855,9 @@ static int zt_indicate(struct ast_channel *chan, int condition) | ||||
| { | ||||
| 	struct zt_pvt *p = chan->pvt->pvt; | ||||
| 	int res=-1; | ||||
| 	int index = zt_get_index(chan, p, 0); | ||||
| 	int index; | ||||
| 	ast_mutex_lock(&p->lock); | ||||
| 	index = zt_get_index(chan, p, 0); | ||||
| 	if (index == SUB_REAL) { | ||||
| 		switch(condition) { | ||||
| 		case AST_CONTROL_BUSY: | ||||
| @@ -3917,6 +3919,7 @@ static int zt_indicate(struct ast_channel *chan, int condition) | ||||
| 		} | ||||
| 	} else | ||||
| 		res = 0; | ||||
| 	ast_mutex_unlock(&p->lock); | ||||
| 	return res; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user