mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
remove an XXX comment and document that ast_autoservice_start() will return -1
if the channel is already in the autoservice list. Why is this a valid case to return -1, you ask? Well, there should never be any code where it is not clear if the channel is in autoservice or not because trying to read frames from a channel that is in the autoservice list will lead to bad results because more than one thread will be waiting on frames to arrive on the channel and then trying to read them. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -104,7 +104,6 @@ int ast_autoservice_start(struct ast_channel *chan)
|
||||
if (as->chan == chan)
|
||||
break;
|
||||
}
|
||||
/* XXX if found, we return -1, why ??? */
|
||||
|
||||
/* If not, start autoservice on channel */
|
||||
if (!as && (as = ast_calloc(1, sizeof(*as)))) {
|
||||
|
Reference in New Issue
Block a user