Fixed SleepEx return value and added log messages for unimplemented features.

This commit is contained in:
Armin Novak 2019-02-08 11:46:02 +01:00
parent c7b7d527f3
commit a16813d237
1 changed files with 9 additions and 2 deletions

View File

@ -25,6 +25,10 @@
#include <winpr/synch.h>
#include "../log.h"
#define TAG WINPR_TAG("synch.sleep")
#ifndef _WIN32
#include <time.h>
@ -43,8 +47,11 @@ VOID Sleep(DWORD dwMilliseconds)
DWORD SleepEx(DWORD dwMilliseconds, BOOL bAlertable)
{
usleep(dwMilliseconds * 1000);
return TRUE;
/* TODO: Implement bAlertable support */
if (bAlertable)
WLog_WARN(TAG, "%s does not support bAlertable", __FUNCTION__);
Sleep(dwMilliseconds);
return 0;
}
#endif