Quellcode durchsuchen

* Added exitstatus to conf_to_bin() to be passed to write_settings()

svn: 1854
Bryan Drewery vor 21 Jahren
Ursprung
Commit
c3de6bc616
4 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 2 2
      src/binary.c
  2. 1 1
      src/binary.h
  3. 1 1
      src/conf.c
  4. 1 1
      src/main.c

+ 2 - 2
src/binary.c

@@ -430,7 +430,7 @@ clear_settings(void)
   memset(&settings.bots, 0, sizeof(settings_t) - 3467);
 }
 
-void conf_to_bin(conf_t *in, bool move)
+void conf_to_bin(conf_t *in, bool move, int die)
 {
   conf_bot *bot = NULL;
   char *newbin = NULL;
@@ -465,5 +465,5 @@ void conf_to_bin(conf_t *in, bool move)
   else
     newbin = binname;
   /* tellconfig(&settings); */
-  write_settings(newbin, 1, 1);
+  write_settings(newbin, 1, die);
 }

+ 1 - 1
src/binary.h

@@ -12,5 +12,5 @@ extern int checked_bin_buf;
 
 void check_sum(const char *, const char *);
 void write_settings(const char *, int, int);
-void conf_to_bin(conf_t *, bool);
+void conf_to_bin(conf_t *, bool, int);
 #endif /* !_BINARY_H */

+ 1 - 1
src/conf.c

@@ -254,7 +254,7 @@ confedit()
   readconf((const char *) tmpconf.file, 0);               /* read cleartext conf tmp into &settings */
   fix_tilde(&conf.binpath);
   unlink(tmpconf.file);
-  conf_to_bin(&conf, 0);	/* will exit */
+  conf_to_bin(&conf, 0, 1);	/* will exit */
   exit(0);                      /* never reached */
 
 fatal:

+ 1 - 1
src/main.c

@@ -292,7 +292,7 @@ static void dtx_arg(int argc, char *argv[])
         readconf(optarg, CONF_ENC);
         fix_tilde(&conf.binpath);
         parseconf(0);
-        conf_to_bin(&conf, 1);		/* this will exit() in write_settings() */
+        conf_to_bin(&conf, 1, 6);		/* this will exit() in write_settings() */
       case 'B':
         localhub = 0;
         used_B = 1;