Przeglądaj źródła

* Remove obsoleted conf.watcher

Bryan Drewery 16 lat temu
rodzic
commit
ea6948ccde
6 zmienionych plików z 2 dodań i 19 usunięć
  1. 0 3
      src/bg.h
  2. 1 4
      src/binary.c
  3. 0 2
      src/cmds.c
  4. 0 7
      src/conf.c
  5. 0 1
      src/conf.h
  6. 1 2
      src/settings.h

+ 0 - 3
src/bg.h

@@ -8,9 +8,6 @@
 #include <sys/types.h>
 
 extern time_t 		lastfork;
-#if !defined(CYGWIN_HACKS) && !defined(__sun__)
-extern pid_t 		watcher;
-#endif
 
 pid_t do_fork();
 int close_tty();

+ 1 - 4
src/binary.c

@@ -32,7 +32,7 @@ settings_t settings = {
   /* -- STATIC -- */
   "", "", "", "", "", "", "", "", "", "",
   /* -- DYNAMIC -- */
-  "", "", "", "", "", "", "", "", "", "", "",
+  "", "", "", "", "", "", "", "", "", "",
   /* -- PADDING */
   ""
 };
@@ -477,7 +477,6 @@ static void edpack(settings_t *incfg, const char *in_hash, int what)
   dofield(incfg->bots);
   dofield(incfg->uid);
   dofield(incfg->autocron);
-  dofield(incfg->watcher);
   dofield(incfg->username);
   dofield(incfg->datadir);
   dofield(incfg->homedir);
@@ -513,7 +512,6 @@ tellconfig(settings_t *incfg)
   dofield(incfg->bots);
   dofield(incfg->uid);
   dofield(incfg->autocron);
-  dofield(incfg->watcher);
   dofield(incfg->username);
   dofield(incfg->datadir);
   dofield(incfg->homedir);
@@ -667,7 +665,6 @@ void conf_to_bin(conf_t *in, bool move, int die)
   clear_settings();
   sdprintf("converting conf to bin\n");
   simple_snprintf(settings.uid, sizeof(settings.uid), "%d", in->uid);
-  simple_snprintf(settings.watcher, sizeof(settings.watcher), "%d", in->watcher);
   simple_snprintf(settings.autocron, sizeof(settings.autocron), "%d", in->autocron);
   simple_snprintf(settings.portmin, sizeof(settings.portmin), "%d", in->portmin);
   simple_snprintf(settings.portmax, sizeof(settings.portmax), "%d", in->portmax);

+ 0 - 2
src/cmds.c

@@ -1754,7 +1754,6 @@ static void cmd_conf(int idx, char *par)
         else if (!strcasecmp(what, "portmin"))   conf.portmin = atoi(par);
         else if (!strcasecmp(what, "portmax"))   conf.portmax = atoi(par);
         else if (!strcasecmp(what, "autocron"))  conf.autocron = atoi(par);
-        else if (!strcasecmp(what, "watcher"))  conf.watcher = atoi(par);
         else { 
           set--;
           save = 0;
@@ -1775,7 +1774,6 @@ static void cmd_conf(int idx, char *par)
       if (!what || !strcasecmp(what, "portmin"))    dprintf(idx, "%sportmin: %d\n", ss, conf.portmin);
       if (!what || !strcasecmp(what, "portmax"))    dprintf(idx, "%sportmax: %d\n", ss, conf.portmax);
       if (!what || !strcasecmp(what, "autocron"))   dprintf(idx, "%sautocron: %d\n", ss, conf.autocron);
-      if (!what || !strcasecmp(what, "watcher"))    dprintf(idx, "%swatcher: %d\n", ss, conf.watcher);
     }
   }
 #endif /* !CYGWIN_HACKS */

+ 0 - 7
src/conf.c

@@ -58,7 +58,6 @@ tellconf()
   sdprintf(STR("portmin: %d\n"), conf.portmin);
   sdprintf(STR("portmax: %d\n"), conf.portmax);
   sdprintf(STR("autocron: %d\n"), conf.autocron);
-  sdprintf(STR("watcher: %d\n"), conf.watcher);
   sdprintf(STR("bots:\n"));
   for (bot = conf.bots; bot && bot->nick; bot = bot->next) {
     i++;
@@ -346,7 +345,6 @@ init_conf()
   conf.bot = NULL;
 
   conf.localhub = NULL;
-  conf.watcher = 0;
 #ifdef CYGWIN_HACKS
   conf.autocron = 0;
 #else
@@ -698,10 +696,6 @@ readconf(const char *fname, int bits)
         if (str_isdigit(line.c_str()))
           conf.uid = atoi(line.c_str());
 
-      } else if (option == STR("watcher")) {
-        if (egg_isdigit(line[0]))
-          conf.watcher = atoi(line.c_str());
-
       } else {
         putlog(LOG_MISC, "*", STR("Unrecognized config option '%s'"), option.c_str());
 
@@ -991,7 +985,6 @@ bin_to_conf(bool error)
   conf.portmin = atol(settings.portmin);
   conf.portmax = atol(settings.portmax);
   conf.autocron = atoi(settings.autocron);
-  conf.watcher = atoi(settings.watcher);
 
 
   prep_homedir(error);

+ 0 - 1
src/conf.h

@@ -33,7 +33,6 @@ typedef struct conf_b {
   int features;		/* Pack features (take, mdop, beta... etc..) */
   int uid;
   int autocron;         /* should the bot auto crontab itself? */
-  int watcher;		/* spawn a watcher pid to block ptrace? */
   char *localhub;	/* my localhub */
   char *datadir;
   char *username;       /* shell username */

+ 1 - 2
src/settings.h

@@ -25,7 +25,6 @@ typedef struct settings_struct {
   char bots[1025];
   char uid[17];
   char autocron[17];         /* should the bot auto crontab itself? */
-  char watcher[17];          /* spawn a watcher pid to block ptrace? */
   char username[49];       /* shell username */
   char datadir[1025];
   char homedir[1025];        /* homedir */
@@ -50,7 +49,7 @@ sizeof(settings.owners) + sizeof(settings.hubs) + sizeof(settings.owneremail) +
 sizeof(settings.salt1) + sizeof(settings.salt2) + sizeof(settings.dcc_prefix) + sizeof(settings.features)
 
 #define SIZE_CONF sizeof(settings.bots) + sizeof(settings.uid) + \
-sizeof(settings.autocron) + sizeof(settings.watcher) + \
+sizeof(settings.autocron) + \
 sizeof(settings.username) + sizeof(settings.homedir) + sizeof(settings.binpath) + sizeof(settings.binname) + \
 sizeof(settings.portmin) + sizeof(settings.portmin) + sizeof(settings.datadir)