From: Luigi Rizzo Date: Wed, 18 Oct 2006 08:48:50 +0000 (+0000) Subject: add a comment to remember that a block of code is X-Git-Tag: 1.6.0-beta1~3^2~4367 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efd87b68ee70930fc6ddb03107125c26b3ac9007;p=thirdparty%2Fasterisk.git add a comment to remember that a block of code is completely redundant. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45495 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index df5a218b54..f35d211e13 100644 --- a/main/manager.c +++ b/main/manager.c @@ -882,6 +882,12 @@ static int authenticate(struct mansession *s, struct message *m) struct ast_config *cfg = ast_config_load("manager.conf"); int ret = -1; /* default: error return */ + /* + * XXX there is no need to scan the config file again here, + * suffices to call ast_get_manager_by_name_locked() to fetch + * the user's entry. + */ + if (!cfg) return -1; while ( (cat = ast_category_browse(cfg, cat)) ) {