Просмотр исходного кода

* Port [3190] to 1.2.14
* Fix ./binary -C not signalling the correct process under some situations. (actually fixes #315)



svn: 3191

Bryan Drewery 19 лет назад
Родитель
Сommit
e41da73f1c
2 измененных файлов с 10 добавлено и 2 удалено
  1. 1 0
      doc/UPDATES
  2. 9 2
      src/conf.c

+ 1 - 0
doc/UPDATES

@@ -6,6 +6,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fix another bug in shell functions. (fixes #321)
 * Fix bug with bots not retaining flags over share. (fixes #334)
 * Remove the notes system and related commands. (fixes #275)
+* Fix ./binary -C not signalling the correct process under some situations. (actually fixes #315)
 
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 * Fix cmd_chanset accepting invalid flags

+ 9 - 2
src/conf.c

@@ -36,6 +36,8 @@ char cfile[DIRMAX] = "";
 #endif /* CYGWIN_HACKS */
 conf_t conf;                    /* global conf struct */
 
+static void conf_bot_dup(conf_bot *dest, conf_bot *src);
+
 static void
 tellconf()
 {
@@ -198,7 +200,7 @@ confedit()
   struct stat st, sn;
   struct timespec ts1, ts2;           /* time before and after edit */
   bool autowrote = 0;
-  conf_bot *localhub = NULL;
+  conf_bot *localhub = NULL, *localhub_old = NULL;
 
   um = umask(077);
 
@@ -312,7 +314,12 @@ confedit()
     }
   }
 
-  localhub = conf_getlocalhub(conf.bots);
+  localhub_old = conf_getlocalhub(conf.bots);
+  
+  if (localhub_old) {
+    localhub = (conf_bot *) my_calloc(1, sizeof(conf_bot));
+    conf_bot_dup(localhub, localhub_old);
+  }
 
   tmpconf.my_close();
   free_conf();