Commit 26e9d27e804e80820ee0de8a615c692fb64f876b

  • avatar
  • photron
  • Fri Sep 03 13:31:07 CEST 2010
Remove non-thread-safe error reporting

virConnCopyLastError is not thread-safe, don't use it.

Reported by Ravi Pawar.
  
13191319 * @throws LibvirtException
13201320 */
13211321 protected void processError() throws LibvirtException {
1322 ErrorHandler.processError(libvirt, VCP);
1322 ErrorHandler.processError(libvirt);
13231323 }
13241324
13251325 /**
  
2828 throw new LibvirtException(error);
2929 }
3030 }
31
32 /**
33 * Look for the latest error from libvirt tied to a connection
34 *
35 * @param libvirt
36 * the active connection
37 * @throws LibvirtException
38 */
39 public static void processError(Libvirt libvirt, ConnectionPointer conn) throws LibvirtException {
40 virError vError = new virError();
41 int errorCode = libvirt.virConnCopyLastError(conn, vError);
42 if (errorCode > 0) {
43 Error error = new Error(vError);
44 libvirt.virConnResetLastError(conn);
45 throw new LibvirtException(error);
46 }
47 }
4831}