diff options
-rw-r--r-- | funcs/func_devstate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c index c6429a853..6b0e7a3f9 100644 --- a/funcs/func_devstate.c +++ b/funcs/func_devstate.c @@ -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); |