Commit 26e9d27e804e80820ee0de8a615c692fb64f876b
Remove non-thread-safe error reporting
virConnCopyLastError is not thread-safe, don't use it.
Reported by Ravi Pawar.
| |   |
| 1319 | 1319 | * @throws LibvirtException |
| 1320 | 1320 | */ |
| 1321 | 1321 | protected void processError() throws LibvirtException { |
| ErrorHandler.processError(libvirt, VCP); |
| ErrorHandler.processError(libvirt); |
| 1323 | 1323 | } |
| 1324 | 1324 | |
| 1325 | 1325 | /** |
| |   |
| 28 | 28 | throw new LibvirtException(error); |
| 29 | 29 | } |
| 30 | 30 | } |
|
| /** |
| * Look for the latest error from libvirt tied to a connection |
| * |
| * @param libvirt |
| * the active connection |
| * @throws LibvirtException |
| */ |
| public static void processError(Libvirt libvirt, ConnectionPointer conn) throws LibvirtException { |
| virError vError = new virError(); |
| int errorCode = libvirt.virConnCopyLastError(conn, vError); |
| if (errorCode > 0) { |
| Error error = new Error(vError); |
| libvirt.virConnResetLastError(conn); |
| throw new LibvirtException(error); |
| } |
| } |
| 48 | 31 | } |