projects
/
ircu2.10.12-pk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git]
/
ircd
/
s_conf.c
diff --git
a/ircd/s_conf.c
b/ircd/s_conf.c
index 1dc438b14591253982b44c46370664ae07fc4c83..7db9ff2e4722e68136e3532d6cc7cc5446b475df 100644
(file)
--- a/
ircd/s_conf.c
+++ b/
ircd/s_conf.c
@@
-94,7
+94,6
@@
static void killcomment(struct Client* sptr, const char* filename)
FBFILE* file = 0;
char line[80];
struct stat sb;
FBFILE* file = 0;
char line[80];
struct stat sb;
- struct tm* tm;
if (NULL == (file = fbopen(filename, "r"))) {
send_reply(sptr, ERR_NOMOTD);
if (NULL == (file = fbopen(filename, "r"))) {
send_reply(sptr, ERR_NOMOTD);
@@
-103,7
+102,6
@@
static void killcomment(struct Client* sptr, const char* filename)
return;
}
fbstat(&sb, file);
return;
}
fbstat(&sb, file);
- tm = localtime((time_t*) &sb.st_mtime); /* NetBSD needs cast */
while (fbgets(line, sizeof(line) - 1, file)) {
char* end = line + strlen(line);
while (end > line) {
while (fbgets(line, sizeof(line) - 1, file)) {
char* end = line + strlen(line);
while (end > line) {
@@
-816,9
+814,9
@@
void clear_quarantines(void)
static int conf_error;
/** When non-zero, indicates that the configuration file was loaded at least once. */
static int conf_already_read;
static int conf_error;
/** When non-zero, indicates that the configuration file was loaded at least once. */
static int conf_already_read;
-extern FILE *yyin;
extern void yyparse(void);
extern void yyparse(void);
-extern void init_lexer(void);
+extern int init_lexer(void);
+extern void deinit_lexer(void);
/** Read configuration file.
* @return Zero on failure, non-zero on success. */
/** Read configuration file.
* @return Zero on failure, non-zero on success. */
@@
-827,11
+825,10
@@
int read_configuration_file(void)
conf_error = 0;
feature_unmark(); /* unmark all features for resetting later */
clear_nameservers(); /* clear previous list of DNS servers */
conf_error = 0;
feature_unmark(); /* unmark all features for resetting later */
clear_nameservers(); /* clear previous list of DNS servers */
- /* Now just open an fd. The buffering isn't really needed... */
-
init_lexer()
;
+ if (!init_lexer())
+
return 0
;
yyparse();
yyparse();
- fclose(yyin);
- yyin = NULL;
+ deinit_lexer();
feature_mark(); /* reset unmarked features */
conf_already_read = 1;
return 1;
feature_mark(); /* reset unmarked features */
conf_already_read = 1;
return 1;