Commit 5a3e7de9 authored by Simon McVittie's avatar Simon McVittie

_dbus_test_oom_handling: allow disabling it as documented

We documented DBUS_TEST_MALLOC_FAILURES=0 in HACKING, but it didn't
actually work: we'd iterate from i=-1 to i=0.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194Reviewed-by: Ralf Habacker's avatarRalf Habacker <ralf.habacker@freenet.de>
parent 085f9348
......@@ -1066,6 +1066,12 @@ _dbus_test_oom_handling (const char *description,
max_failures_to_try = 4;
}
if (max_failures_to_try < 1)
{
_dbus_verbose ("not testing OOM handling\n");
return TRUE;
}
i = setting ? max_failures_to_try - 1 : 1;
while (i < max_failures_to_try)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment