mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-06 01:45:11 +00:00
Fix a minor logic flaw with the bridge generic thread.
We only want to move the channel pointers that are actually present. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -319,7 +319,7 @@ static int generic_thread_loop(struct ast_bridge *bridge)
|
||||
/* Move channels around for priority reasons if we have more than one channel in our array */
|
||||
if (bridge->array_num > 1) {
|
||||
struct ast_channel *first = bridge->array[0];
|
||||
memmove(bridge->array, bridge->array + 1, sizeof(bridge->array) - 1);
|
||||
memmove(bridge->array, bridge->array + 1, sizeof(struct ast_channel *) * (bridge->array_num - 1));
|
||||
bridge->array[(bridge->array_num - 1)] = first;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user