summaryrefslogtreecommitdiff
path: root/dbus/dbus-sysdeps-win.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2017-07-03 18:58:42 +0100
committerSimon McVittie <smcv@collabora.com>2017-07-05 13:12:37 +0100
commit0354f5d48fd204bb891946a2baf82290497b44c9 (patch)
tree7d5f1f8e2ef52a20998a73deb65c38851a078b92 /dbus/dbus-sysdeps-win.c
parent2135910d316513efdde69ee3e506a70626b467a3 (diff)
downloaddbus-0354f5d48fd204bb891946a2baf82290497b44c9.tar.gz
internals: Decouple logging an error from exiting unsuccessfully
This lets _dbus_warn() and _dbus_warn_check_failed() fall through to flushing stderr and calling _dbus_abort(), meaning that failed checks and warnings can result in a core dump as intended. By renaming the FATAL severity to ERROR, we ensure that any code contributions that assumed the old semantics will fail to compile. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101568
Diffstat (limited to 'dbus/dbus-sysdeps-win.c')
-rw-r--r--dbus/dbus-sysdeps-win.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c
index 5a94eaf5..74a95018 100644
--- a/dbus/dbus-sysdeps-win.c
+++ b/dbus/dbus-sysdeps-win.c
@@ -3702,9 +3702,6 @@ _dbus_init_system_log (const char *tag,
* @param severity a severity value
* @param msg a printf-style format string
* @param args arguments for the format string
- *
- * If the FATAL severity is given, this function will terminate the program
- * with an error code.
*/
void
_dbus_logv (DBusSystemLogSeverity severity,
@@ -3719,7 +3716,7 @@ _dbus_logv (DBusSystemLogSeverity severity,
case DBUS_SYSTEM_LOG_INFO: s = "info"; break;
case DBUS_SYSTEM_LOG_WARNING: s = "warning"; break;
case DBUS_SYSTEM_LOG_SECURITY: s = "security"; break;
- case DBUS_SYSTEM_LOG_FATAL: s = "fatal"; break;
+ case DBUS_SYSTEM_LOG_ERROR: s = "error"; break;
default: _dbus_assert_not_reached ("invalid log severity");
}
@@ -3743,9 +3740,6 @@ _dbus_logv (DBusSystemLogSeverity severity,
fprintf (stderr, "\n");
va_end (tmp);
}
-
- if (severity == DBUS_SYSTEM_LOG_FATAL)
- exit (1);
}
/** @} end of sysdeps-win */