Commit ca49efd4 authored by Marek Vavrusa's avatar Marek Vavrusa

Small fixes for parser.

parent 41a96927
......@@ -64,6 +64,16 @@ static void conf_acl_item(void *scanner, char *item)
snprintf(buf, sizeof(buf), "remote '%s' is not defined", item);
cf_error(scanner, buf);
} else {
/* check port if xfrin/notify-out */
if (this_list == &this_zone->acl.xfr_in ||
this_list == &this_zone->acl.notify_out) {
if (found->port == 0) {
cf_error(scanner, "remote specified for XFR/IN or NOTIFY/OUT "
" needs to have valid port!");
free(item);
return;
}
}
conf_remote_t *remote = malloc(sizeof(conf_remote_t));
if (!remote) {
cf_error(scanner, "out of memory");
......
......@@ -258,8 +258,6 @@ int main(int argc, char **argv)
}
}
pthread_sigmask(SIG_UNBLOCK, &sa.sa_mask, NULL);
if ((res = server_wait(server)) != KNOTD_EOK) {
log_server_error("An error occured while "
"waiting for server to finish.\n");
......@@ -284,11 +282,6 @@ int main(int argc, char **argv)
log_close();
free(pidfile);
if (!daemonize) {
fflush(stdout);
fflush(stderr);
}
// Destroy event loop
evqueue_t *q = evqueue();
evqueue_free(&q);
......@@ -296,5 +289,10 @@ int main(int argc, char **argv)
// Free default config filename if exists
free(config_fn);
if (!daemonize) {
fflush(stdout);
fflush(stderr);
}
return res;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment