=================================================================== RCS file: /cvs/cvs/blind/blind.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -p -r1.16 -r1.17 --- blind/blind.c 2022/03/20 22:00:51 1.16 +++ blind/blind.c 2022/03/22 02:15:51 1.17 @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) { int ch; - int verbose = 0; + int verbose = 0; int no_action = 0; const char *config = BL_CONF; @@ -80,27 +80,27 @@ main(int argc, char *argv[]) if ((bl = config_init()) == NULL) log_fatal("initialization failed"); - if (verbose) { - bl->bl_opt |= verbose; - log_setv(verbose); - log_debug("verbose mode on"); - } - + if (verbose) { + bl->bl_opt |= verbose; + log_setv(verbose); + log_debug("verbose mode on"); + } + if (strlcpy(bl->bl_conf, config, PATH_MAX) >= PATH_MAX) log_fatal("file name exceeds PATH_MAX"); - if (config_load(bl)) - log_fatal("config %s", bl->bl_conf); - - log_debug("conf=%s", bl->bl_conf); - log_debug("sock=%s", bl->bl_sock); + if (config_load(bl)) + log_fatal("config %s", bl->bl_conf); + + log_debug("conf=%s", bl->bl_conf); + log_debug("sock=%s", bl->bl_sock); log_debug(" ttl=%d", bl->bl_ttl); - log_debug(" opt=%d", bl->bl_opt); + log_debug(" opt=%d", bl->bl_opt); log_debug(" flg=%d", bl->bl_flg); - + // TAILQ_INIT(&offline_queue) - // fork + process setup + communication setup + // fork + process setup + communication setup exit(0); }