mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
Add a minor loop optimization to the custom device state callback. Once the
correct device is found, it should just break out of the loop ... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -99,8 +99,10 @@ static enum ast_device_state custom_devstate_callback(const char *data)
|
||||
|
||||
AST_RWLIST_RDLOCK(&custom_devices);
|
||||
AST_RWLIST_TRAVERSE(&custom_devices, dev, entry) {
|
||||
if (!strcasecmp(dev->name, data))
|
||||
if (!strcasecmp(dev->name, data)) {
|
||||
state = dev->state;
|
||||
break;
|
||||
}
|
||||
}
|
||||
AST_RWLIST_UNLOCK(&custom_devices);
|
||||
|
||||
|
Reference in New Issue
Block a user