mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
common-setup.h wasn't removed from here - Made rawlog to use
"log_create_mode" setting. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@273 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
3e4f947934
commit
0e65ba80ca
@ -28,7 +28,7 @@
|
||||
#include "lib-config/iconfig.h"
|
||||
#include "settings.h"
|
||||
|
||||
#define LOG_FILE_CREATE_MODE 644
|
||||
#define DEFAULT_LOG_FILE_CREATE_MODE 644
|
||||
|
||||
#ifdef HAVE_FCNTL
|
||||
static struct flock lock;
|
||||
@ -418,7 +418,7 @@ void log_init(void)
|
||||
rotate_tag = g_timeout_add(60000, (GSourceFunc) sig_rotate_check, NULL);
|
||||
logs = NULL;
|
||||
|
||||
settings_add_int("log", "log_create_mode", LOG_FILE_CREATE_MODE);
|
||||
settings_add_int("log", "log_create_mode", DEFAULT_LOG_FILE_CREATE_MODE);
|
||||
settings_add_str("log", "log_timestamp", "%H:%M ");
|
||||
settings_add_str("log", "log_open_string", "--- Log opened %a %b %d %H:%M:%S %Y");
|
||||
settings_add_str("log", "log_close_string", "--- Log closed %a %b %d %H:%M:%S %Y");
|
||||
|
@ -25,10 +25,10 @@
|
||||
#include "misc.h"
|
||||
|
||||
#include "settings.h"
|
||||
#include "common-setup.h"
|
||||
|
||||
static int rawlog_lines;
|
||||
static int signal_rawlog;
|
||||
static int log_file_create_mode;
|
||||
|
||||
RAWLOG_REC *rawlog_create(void)
|
||||
{
|
||||
@ -113,7 +113,7 @@ void rawlog_open(RAWLOG_REC *rawlog, const char *fname)
|
||||
return;
|
||||
|
||||
path = convert_home(fname);
|
||||
rawlog->handle = open(path, O_WRONLY | O_APPEND | O_CREAT, LOG_FILE_CREATE_MODE);
|
||||
rawlog->handle = open(path, O_WRONLY | O_APPEND | O_CREAT, log_file_create_mode);
|
||||
g_free(path);
|
||||
|
||||
rawlog_dump(rawlog, rawlog->handle);
|
||||
@ -134,7 +134,7 @@ void rawlog_save(RAWLOG_REC *rawlog, const char *fname)
|
||||
int f;
|
||||
|
||||
path = convert_home(fname);
|
||||
f = open(path, O_WRONLY | O_APPEND | O_CREAT, LOG_FILE_CREATE_MODE);
|
||||
f = open(path, O_WRONLY | O_APPEND | O_CREAT, log_file_create_mode);
|
||||
g_free(path);
|
||||
|
||||
rawlog_dump(rawlog, f);
|
||||
@ -149,6 +149,7 @@ void rawlog_set_size(int lines)
|
||||
static void read_settings(void)
|
||||
{
|
||||
rawlog_set_size(settings_get_int("rawlog_lines"));
|
||||
log_file_create_mode = octal2dec(settings_get_int("log_create_mode"));
|
||||
}
|
||||
|
||||
void rawlog_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user