mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	more efficient (and understandable) ast_channel_walk_locked, and vastly more efficient ast_channel_by_name_locked (bug #4265)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -76,13 +76,7 @@ static int action_setcdruserfield(struct mansession *s, struct message *m) | ||||
| 		astman_send_error(s, m, "No UserField specified"); | ||||
| 		return 0; | ||||
| 	} | ||||
| 	c = ast_channel_walk_locked(NULL); | ||||
| 	while (c) { | ||||
| 		if (!strcasecmp(c->name, channel)) | ||||
| 			break; | ||||
| 		ast_mutex_unlock(&c->lock); | ||||
| 		c = ast_channel_walk_locked(c); | ||||
| 	} | ||||
| 	c = ast_get_channel_by_name_locked(channel); | ||||
| 	if (!c) { | ||||
| 		astman_send_error(s, m, "No such channel"); | ||||
| 		return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user