Nikolay Shirokovskiy 1bff5bbe25 util: set OOM in virCopyLastError if error is not set
virCopyLastError is intended to be used after last error is set.
However due to virLastErrorObject failures (very unlikely though
as thread local error is allocated on first use) we can have zero
fields in a copy as a result. In particular code field can be set
to VIR_ERR_OK.

In some places (qemu monitor, qemu agent and qemu migaration code
for example) we use copy result as a flag and this leads to bugs.

Let's set OOM-like error in copy in case of virLastErrorObject failures.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
2018-07-19 10:49:46 +03:00
..
2018-07-18 17:54:18 +02:00
2017-11-03 13:24:12 +01:00
2017-01-25 09:18:49 +01:00
2017-07-26 15:31:25 +02:00
2017-01-04 12:47:01 +01:00
2017-05-16 16:48:30 +02:00
2017-06-12 19:11:30 -04:00
2018-04-01 17:42:29 +02:00
2018-07-18 17:54:18 +02:00
2018-07-18 17:54:18 +02:00
2018-03-12 16:30:49 +01:00
2018-07-15 12:09:09 +02:00
2018-03-14 12:46:26 +01:00
2018-07-16 14:12:07 +02:00
2018-07-16 14:12:07 +02:00
2017-12-05 11:28:19 +01:00
2016-12-15 09:25:16 +01:00
2017-11-03 13:24:12 +01:00
2018-05-29 15:42:03 +02:00
2018-05-29 15:42:03 +02:00
2017-11-03 13:24:12 +01:00