[BACK]Return to blind.c CVS log [TXT][DIR] Up to [local] / blind

Diff for /blind/blind.c between version 1.11 and 1.17

version 1.11, 2022/03/19 07:42:12 version 1.17, 2022/03/22 02:15:51
Line 24 
Line 24 
 #include "config.h"  #include "config.h"
 #include "log.h"  #include "log.h"
   
 static void usage(void);  static void     usage(void);
   
 int              daemonize = 1;  int             daemonize = 1;
 struct blind    *bl;  struct blind   *bl;
   
 static void  static void
 usage(void)  usage(void)
Line 42  int
Line 42  int
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
         int              ch;          int              ch;
         int              verbose = 0;          int              verbose = 0;
         int              no_action = 0;          int              no_action = 0;
         const char      *config = BL_CONF;          const char      *config = BL_CONF;
   
Line 75  main(int argc, char *argv[])
Line 75  main(int argc, char *argv[])
                 usage();                  usage();
   
         log_init(daemonize, LOG_DAEMON);          log_init(daemonize, LOG_DAEMON);
         log_info("%s %s starting", BL_TEXT, BL_VERS);          log_info("%s %s", BL_TEXT, BL_VERS);
   
         if ((bl = config_init()) == NULL)          if ((bl = config_init()) == NULL)
                 log_fatal("default values init failed");                  log_fatal("initialization failed");
   
         if (strlcpy(bl->bl_conf, config, PATH_MAX)>= PATH_MAX)          if (verbose) {
                 log_fatal("config file name exceeds PATH_MAX");                  bl->bl_opt |= verbose;
                   log_setv(verbose);
                   log_debug("verbose mode on");
           }
   
         bl->bl_opt |= verbose;          if (strlcpy(bl->bl_conf, config, PATH_MAX) >= PATH_MAX)
         log_setv(verbose);                  log_fatal("file name exceeds PATH_MAX");
         log_debug("verbose mode on");  
   
         // conf file  
   
         // parse config          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("conf=%s", bl->bl_conf);
           log_debug("sock=%s", bl->bl_sock);
         log_debug(" ttl=%d", bl->bl_ttl);          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);          log_debug(" flg=%d", bl->bl_flg);
   
         // TAILQ_INIT(&offline_queue)          // TAILQ_INIT(&offline_queue)
   
           // fork +  process setup + communication setup
   
         exit(0);          exit(0);
 }  }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.17

https://cvs.kroczynski.net