]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix an incorrect usage of scanf, where it should be using sscanf, instead,
authorRussell Bryant <russell@russellbryant.com>
Wed, 7 Jun 2006 19:42:37 +0000 (19:42 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 7 Jun 2006 19:42:37 +0000 (19:42 +0000)
which was causing asterisk to hang when loading this module
(reported by blitzrage on IRC)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32867 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_followme.c

index 942f0529b417cfbcf8bb42820ed53cdb45bbf2bb..5b6a8f184331dfc53083faaeb8c5dae3c76c15f0 100644 (file)
@@ -308,9 +308,10 @@ static int reload_followme(void)
        }
        featuredigittostr = ast_variable_retrieve(cfg, "general", "featuredigittimeout");
        
-       if (!ast_strlen_zero(featuredigittostr)) 
-               if (!scanf("%d", &featuredigittimeout))
+       if (!ast_strlen_zero(featuredigittostr)) {
+               if (!sscanf(featuredigittostr, "%d", &featuredigittimeout))
                        featuredigittimeout = 5000;
+       }
 
        takecallstr = ast_variable_retrieve(cfg, "general", "takecall");
        if (!ast_strlen_zero(takecallstr))