Commit c0977fcb authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

services: Make svcctl_{Lock, Unlock}ServiceDatabase() into a no-op.

parent 529b07ee
......@@ -1365,55 +1365,23 @@ DWORD __cdecl svcctl_CloseServiceHandle(
return ERROR_SUCCESS;
}
static void SC_RPC_LOCK_destroy(SC_RPC_LOCK hLock)
{
struct sc_lock *lock = hLock;
scmdatabase_unlock_startup(lock->db);
HeapFree(GetProcessHeap(), 0, lock);
}
void __RPC_USER SC_RPC_LOCK_rundown(SC_RPC_LOCK hLock)
{
SC_RPC_LOCK_destroy(hLock);
}
DWORD __cdecl svcctl_LockServiceDatabase(
SC_RPC_HANDLE hSCManager,
SC_RPC_LOCK *phLock)
DWORD __cdecl svcctl_LockServiceDatabase(SC_RPC_HANDLE manager, SC_RPC_LOCK *lock)
{
struct sc_manager_handle *manager;
struct sc_lock *lock;
DWORD err;
WINE_TRACE("(%p, %p)\n", hSCManager, phLock);
if ((err = validate_scm_handle(hSCManager, SC_MANAGER_LOCK, &manager)) != ERROR_SUCCESS)
return err;
if (!scmdatabase_lock_startup(manager->db, 0))
return ERROR_SERVICE_DATABASE_LOCKED;
lock = HeapAlloc(GetProcessHeap(), 0, sizeof(struct sc_lock));
if (!lock)
{
scmdatabase_unlock_startup(manager->db);
return ERROR_NOT_ENOUGH_SERVER_MEMORY;
}
lock->db = manager->db;
*phLock = lock;
TRACE("(%p, %p)\n", manager, lock);
*lock = (SC_RPC_LOCK)0xdeadbeef;
return ERROR_SUCCESS;
}
DWORD __cdecl svcctl_UnlockServiceDatabase(
SC_RPC_LOCK *phLock)
DWORD __cdecl svcctl_UnlockServiceDatabase(SC_RPC_LOCK *lock)
{
WINE_TRACE("(&%p)\n", *phLock);
SC_RPC_LOCK_destroy(*phLock);
*phLock = NULL;
TRACE("(&%p)\n", *lock);
*lock = NULL;
return ERROR_SUCCESS;
}
......
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