aboutsummaryrefslogtreecommitdiffstats
path: root/main/devicestate.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-26 15:16:20 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-26 15:16:20 +0000
commit695ec5d5c70da50eb32109d7869ab9306c6e9b65 (patch)
treee6f968da991420d9d1da914b51e16c249cf1560b /main/devicestate.c
parent9e1954caf60e9f259723dc3f5e222e335b11b914 (diff)
actually use the cache_cache argument
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@133946 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/devicestate.c')
-rw-r--r--main/devicestate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/devicestate.c b/main/devicestate.c
index 97c9c06ca..1601ee12c 100644
--- a/main/devicestate.c
+++ b/main/devicestate.c
@@ -339,9 +339,12 @@ static enum ast_device_state _ast_device_state(const char *device, int check_cac
char *provider = NULL;
/* If the last known state is cached, just return that */
- res = devstate_cached(device);
- if (res != AST_DEVICE_UNKNOWN)
- return res;
+ if (check_cache) {
+ res = devstate_cached(device);
+ if (res != AST_DEVICE_UNKNOWN) {
+ return res;
+ }
+ }
buf = ast_strdupa(device);
tech = strsep(&buf, "/");