[asterisk-commits] russell: trunk r133946 - /trunk/main/devicestate.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jul 26 10:16:20 CDT 2008


Author: russell
Date: Sat Jul 26 10:16:20 2008
New Revision: 133946

URL: http://svn.digium.com/view/asterisk?view=rev&rev=133946
Log:
actually use the cache_cache argument

Modified:
    trunk/main/devicestate.c

Modified: trunk/main/devicestate.c
URL: http://svn.digium.com/view/asterisk/trunk/main/devicestate.c?view=diff&rev=133946&r1=133945&r2=133946
==============================================================================
--- trunk/main/devicestate.c (original)
+++ trunk/main/devicestate.c Sat Jul 26 10:16:20 2008
@@ -339,9 +339,12 @@
 	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, "/");




More information about the asterisk-commits mailing list