From caf5aef4c5673c55420116cdd7cd6696c4cfe702 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 24 Jun 2015 12:56:21 +0200 Subject: [PATCH] test: Finalize removal of locking from driver->eventState Don't lock the driver when registering event callbacks. --- src/test/test_driver.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2ab0402c2d..b08c1e5bc1 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5915,11 +5915,9 @@ testConnectDomainEventRegister(virConnectPtr conn, testDriverPtr driver = conn->privateData; int ret = 0; - testDriverLock(driver); if (virDomainEventStateRegister(conn, driver->eventState, callback, opaque, freecb) < 0) ret = -1; - testDriverUnlock(driver); return ret; } @@ -5932,11 +5930,9 @@ testConnectDomainEventDeregister(virConnectPtr conn, testDriverPtr driver = conn->privateData; int ret = 0; - testDriverLock(driver); if (virDomainEventStateDeregister(conn, driver->eventState, callback) < 0) ret = -1; - testDriverUnlock(driver); return ret; } @@ -5953,12 +5949,10 @@ testConnectDomainEventRegisterAny(virConnectPtr conn, testDriverPtr driver = conn->privateData; int ret; - testDriverLock(driver); if (virDomainEventStateRegisterID(conn, driver->eventState, dom, eventID, callback, opaque, freecb, &ret) < 0) ret = -1; - testDriverUnlock(driver); return ret; } @@ -5970,11 +5964,9 @@ testConnectDomainEventDeregisterAny(virConnectPtr conn, testDriverPtr driver = conn->privateData; int ret = 0; - testDriverLock(driver); if (virObjectEventStateDeregisterID(conn, driver->eventState, callbackID) < 0) ret = -1; - testDriverUnlock(driver); return ret; } @@ -5991,12 +5983,10 @@ testConnectNetworkEventRegisterAny(virConnectPtr conn, testDriverPtr driver = conn->privateData; int ret; - testDriverLock(driver); if (virNetworkEventStateRegisterID(conn, driver->eventState, net, eventID, callback, opaque, freecb, &ret) < 0) ret = -1; - testDriverUnlock(driver); return ret; } @@ -6008,11 +5998,9 @@ testConnectNetworkEventDeregisterAny(virConnectPtr conn, testDriverPtr driver = conn->privateData; int ret = 0; - testDriverLock(driver); if (virObjectEventStateDeregisterID(conn, driver->eventState, callbackID) < 0) ret = -1; - testDriverUnlock(driver); return ret; } -- GitLab