]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If there are no realtime engines, there's no reason to check for realtime families
authorOlle Johansson <oej@edvina.net>
Tue, 17 Feb 2009 15:18:55 +0000 (15:18 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 17 Feb 2009 15:18:55 +0000 (15:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176513 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/config.c

index 33a8ecb7b7119e8b2bba83ed6686f998aa8fe29b..83adee0a4db3f1e358d17c260b945c1e53dace65 100644 (file)
@@ -2137,6 +2137,9 @@ struct ast_variable *ast_load_realtime(const char *family, ...)
 int ast_check_realtime(const char *family)
 {
        struct ast_config_engine *eng;
+       if (!ast_realtime_enabled()) {
+               return 0;       /* There are no engines at all so fail early */
+       }
 
        eng = find_engine(family, NULL, 0, NULL, 0);
        if (eng)