Пример #1
0
DWORD
VmDirResetVmdir(
    VOID)
{
    DWORD dwError = 0;

    dwError = VmDirStopService();
    BAIL_ON_VMDIR_ERROR(dwError);
    VMDIR_LOG_INFO( VMDIR_LOG_MASK_ALL, "VMWare Directory Service stopped." );

    //Test for bug#1034595. On Windows, vmdird may fail to stop. Wait 2 seconds here.
    //Remove it if it's not useful
    VmDirSleep(2000);

    dwError = VmDirCleanupData();
    BAIL_ON_VMDIR_ERROR(dwError);
    VMDIR_LOG_INFO( VMDIR_LOG_MASK_ALL, "VMWare Directory Service database removed." );

    dwError = VmDirStartService();
    BAIL_ON_VMDIR_ERROR(dwError);
    VMDIR_LOG_INFO( VMDIR_LOG_MASK_ALL, "VMWare Directory Service ready for re-promotion." );

error:
    return dwError;
}
Пример #2
0
DWORD
VmDirResetVmdir(
    VOID)
{
    DWORD dwError = 0;

    dwError = VmDirStopService();
    BAIL_ON_VMDIR_ERROR(dwError);

    //Test for bug#1034595. On Windows, vmdird may fail to stop. Wait 2 seconds here.
    //Remove it if it's not useful
    VmDirSleep(2000);

    dwError = VmDirCleanupData();
    BAIL_ON_VMDIR_ERROR(dwError);

    dwError = VmDirStartService();
    BAIL_ON_VMDIR_ERROR(dwError);

error:
    return dwError;
}