mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@175 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
00c2388666
commit
9044f31921
@ -208,15 +208,16 @@ void sig_term(int n)
|
||||
static CONFIG_REC *parse_configfile(const char *fname)
|
||||
{
|
||||
CONFIG_REC *config;
|
||||
char *str;
|
||||
char *real_fname;
|
||||
|
||||
str = fname != NULL ? g_strdup(fname) :
|
||||
real_fname = fname != NULL ? g_strdup(fname) :
|
||||
g_strdup_printf("%s/.irssi/config", g_get_home_dir());
|
||||
config = config_open(str, -1);
|
||||
g_free(str);
|
||||
config = config_open(real_fname, -1);
|
||||
|
||||
if (config == NULL && *fname != '\0')
|
||||
if (config == NULL && fname != NULL) {
|
||||
g_free(real_fname);
|
||||
return NULL; /* specified config file not found */
|
||||
}
|
||||
|
||||
if (config != NULL)
|
||||
config_parse(config);
|
||||
@ -233,9 +234,10 @@ static CONFIG_REC *parse_configfile(const char *fname)
|
||||
config_parse_data(config, default_config, "internal");
|
||||
}
|
||||
|
||||
config_change_file_name(config, fname, 0660);
|
||||
config_change_file_name(config, real_fname, 0660);
|
||||
}
|
||||
|
||||
g_free(real_fname);
|
||||
return config;
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ static int signal_emitv_id(int signal_id, int params, va_list va)
|
||||
|
||||
arglist[0] = GINT_TO_POINTER(signal_id);
|
||||
for (n = 1; n < 8; n++)
|
||||
arglist[n] = n >= params ? NULL : va_arg(va, gconstpointer);
|
||||
arglist[n] = n > params ? NULL : va_arg(va, gconstpointer);
|
||||
|
||||
/* send "signal" */
|
||||
if (first_signal_rec != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user