diff src/context.cpp @ 99:f8963ddf7143 stable-5-7

failed to return a value from parse_verify()
author carl
date Fri, 23 Sep 2005 07:58:34 -0700
parents cc3b79349c9c
children 63e8633abc34
line wrap: on
line diff
--- a/src/context.cpp	Thu Sep 22 21:57:08 2005 -0700
+++ b/src/context.cpp	Fri Sep 23 07:58:34 2005 -0700
@@ -1034,6 +1034,7 @@
 	if (!tsa(tok, token_semi)) return false;
 	me.set_verify(host);
 	add_verify_host(host);
+	return true;
 }
 
 
@@ -1168,20 +1169,24 @@
 // parse a config file
 //
 bool load_conf(CONFIG &dc, char *fn) {
+	int count = 0;
 	TOKEN tok(fn, &dc.config_files);
 	while (true) {
 		char *have = tok.next();
 		if (!have) break;
 		if (have == token_context) {
 			if (!parse_context(tok, dc, NULL)) {
+				tok.token_error("load_conf() failed to parse context");
 				return false;
 			}
+			else count++;
 		}
 		else {
 			tok.token_error(token_context, have);
 			return false;
 		}
 	}
+	tok.token_error("load_conf() found %d contexts in %s", count, fn);
 	return (dc.default_context) ? true : false;
 }