forked from osmocom/wireshark
Display g_error messages in the console window unconditionally, if preferences aren't loaded yet.
This way we ensure that errors are displayed during protocol registration. Use g_error instead of g_warning, if not allowed characters are used in display filter names for protocols. Extend the error message in this case. svn path=/trunk/; revision=17248
This commit is contained in:
parent
009b5f7d29
commit
e271ba9a3c
|
@ -3264,7 +3264,9 @@ proto_register_protocol(const char *name, const char *short_name, const char *fi
|
|||
}
|
||||
}
|
||||
if (found_invalid) {
|
||||
g_warning("Protocol filter name \"%s\" has one or more invalid characters.", filter_name);
|
||||
g_error("Protocol filter name \"%s\" has one or more invalid characters."
|
||||
" Allowed are lower characters, digits, '-', '_' and '.'."
|
||||
" This might be caused by an inappropriate plugin or a development error.", filter_name);
|
||||
}
|
||||
key = g_malloc (sizeof(gint));
|
||||
*key = g_str_hash(filter_name);
|
||||
|
|
|
@ -2921,8 +2921,10 @@ console_log_handler(const char *log_domain, GLogLevelFlags log_level,
|
|||
const char *level;
|
||||
|
||||
|
||||
/* ignore log message, if log_level isn't interesting */
|
||||
if( !(log_level & G_LOG_LEVEL_MASK & prefs.console_log_level)) {
|
||||
/* ignore log message, if log_level isn't interesting.
|
||||
If preferences aren't loaded yet, display message anyway */
|
||||
if((log_level & G_LOG_LEVEL_MASK & prefs.console_log_level) == 0 &&
|
||||
prefs.console_log_level != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue