Merge regression fix and cleanup from exg
authorJelmer Vernooij <jelmer@samba.org>
Wed, 4 Apr 2007 18:45:29 +0000 (20:45 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 4 Apr 2007 18:45:29 +0000 (20:45 +0200)
1  2 
mods/log_custom.c

index 80a21a742670dbcc3e4b7f7675b5f24a2882c6c0,278c4e5620b2887cec73e73db4e622e98a686780..19207cfd824c5d8773b2929eadbd83aaf36a7726
@@@ -387,6 -387,24 +387,24 @@@ static FILE *find_add_channel_file(stru
        return fi->file;
  }
  
 -static inline void file_write_line(struct log_custom_data *data, struct network *network, const char *fmt,
++static void file_write_line(struct log_custom_data *data, struct network *network, const char *fmt,
+                                  const struct line *l, const char *t, gboolean create_file)
+ {
+       FILE *f;
+       char *s;
+       f = find_add_channel_file(data, network, l, t, create_file);
+       if (f == NULL) return;
+       custom_subst(network, &s, fmt, l, t, FALSE, FALSE);
+       fputs(s, f);
+       fputc('\n', f);
+       fflush(f);
+       g_free(s);
+ }
  static void file_write_target(struct log_custom_data *data, 
                                                          struct network *network, const char *n, 
                                                          const struct line *l)