Merge branch 'master' of github.com:FreeRDP/FreeRDP
This commit is contained in:
commit
0054b6b134
@ -566,6 +566,10 @@ if(TARGET_ARCH MATCHES "x86|x64")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TARGET_ARCH MATCHES "sparc")
|
||||
set(HAVE_ALIGNED_REQUIRED 1)
|
||||
endif()
|
||||
|
||||
# Path to put FreeRDP data
|
||||
set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/freerdp")
|
||||
|
||||
|
@ -805,13 +805,13 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
|
||||
assert(FALSE);
|
||||
|
||||
WLog_Print(serial->log, WLOG_DEBUG, "Unknown server's serial driver: %s. SerCx2 will be used", driver);
|
||||
serial->ServerSerialDriverId = SerialDriverSerCx2Sys;
|
||||
serial->ServerSerialDriverId = SerialDriverSerialSys;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* default driver */
|
||||
serial->ServerSerialDriverId = SerialDriverSerCx2Sys;
|
||||
serial->ServerSerialDriverId = SerialDriverSerialSys;
|
||||
}
|
||||
|
||||
|
||||
|
@ -8,6 +8,8 @@ elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "i386") AND (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(TARGET_ARCH "x64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm*")
|
||||
set(TARGET_ARCH "ARM")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
|
||||
set(TARGET_ARCH "sparc")
|
||||
endif()
|
||||
|
||||
option(WITH_MANPAGES "Generate manpages." ON)
|
||||
|
@ -32,6 +32,9 @@
|
||||
#cmakedefine HAVE_VALGRIND_MEMCHECK_H
|
||||
#cmakedefine HAVE_EXECINFO_H
|
||||
|
||||
/* Features */
|
||||
#cmakedefine HAVE_ALIGNED_REQUIRED
|
||||
|
||||
/* Options */
|
||||
#cmakedefine WITH_PROFILER
|
||||
#cmakedefine WITH_GPROF
|
||||
|
@ -206,7 +206,11 @@ static INLINE UINT32 ExtractRunLength(UINT32 code, BYTE* pbOrderHdr, UINT32* adv
|
||||
#undef RLEEXTRA
|
||||
#define DESTWRITEPIXEL(_buf, _pix) ((UINT16*)(_buf))[0] = (UINT16)(_pix)
|
||||
#define DESTREADPIXEL(_pix, _buf) _pix = ((UINT16*)(_buf))[0]
|
||||
#ifdef HAVE_ALIGNED_REQUIRED
|
||||
#define SRCREADPIXEL(_pix, _buf) _pix = (_buf)[0] | ((_buf)[1] << 8)
|
||||
#else
|
||||
#define SRCREADPIXEL(_pix, _buf) _pix = ((UINT16*)(_buf))[0]
|
||||
#endif
|
||||
#define DESTNEXTPIXEL(_buf) _buf += 2
|
||||
#define SRCNEXTPIXEL(_buf) _buf += 2
|
||||
#define WRITEFGBGIMAGE WriteFgBgImage16to16
|
||||
|
@ -55,7 +55,7 @@ BOOL _comm_set_permissive(HANDLE hDevice, BOOL permissive)
|
||||
}
|
||||
|
||||
|
||||
/* Computes VMIN in deciseconds from Ti in milliseconds */
|
||||
/* Computes VTIME in deciseconds from Ti in milliseconds */
|
||||
static UCHAR _vtime(ULONG Ti)
|
||||
{
|
||||
/* FIXME: look for an equivalent math function otherwise let
|
||||
@ -91,7 +91,7 @@ BOOL CommReadFile(HANDLE hDevice, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
UCHAR vmin = 0;
|
||||
UCHAR vtime = 0;
|
||||
ULONGLONG Tmax = 0;
|
||||
struct timeval tmaxTimeout, *pTmaxTimeout;
|
||||
struct timeval tmaxTimeout;
|
||||
struct termios currentTermios;
|
||||
|
||||
EnterCriticalSection(&pComm->ReadLock); /* KISSer by the function's beginning */
|
||||
@ -219,15 +219,11 @@ BOOL CommReadFile(HANDLE hDevice, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
}
|
||||
}
|
||||
|
||||
pTmaxTimeout = NULL; /* no timeout if Tmax == 0 */
|
||||
if (Tmax > 0)
|
||||
ZeroMemory(&tmaxTimeout, sizeof(struct timeval));
|
||||
if (Tmax > 0) /* no timeout if Tmax == 0 */
|
||||
{
|
||||
ZeroMemory(&tmaxTimeout, sizeof(struct timeval));
|
||||
|
||||
tmaxTimeout.tv_sec = Tmax / 1000; /* s */
|
||||
tmaxTimeout.tv_usec = (Tmax % 1000) * 1000; /* us */
|
||||
|
||||
pTmaxTimeout = &tmaxTimeout;
|
||||
}
|
||||
|
||||
|
||||
@ -248,7 +244,7 @@ BOOL CommReadFile(HANDLE hDevice, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
FD_SET(pComm->fd_read_event, &read_set);
|
||||
FD_SET(pComm->fd_read, &read_set);
|
||||
|
||||
nbFds = select(biggestFd+1, &read_set, NULL, NULL, pTmaxTimeout);
|
||||
nbFds = select(biggestFd+1, &read_set, NULL, NULL, &tmaxTimeout);
|
||||
if (nbFds < 0)
|
||||
{
|
||||
CommLog_Print(WLOG_WARN, "select() failure, errno=[%d] %s\n", errno, strerror(errno));
|
||||
@ -296,6 +292,7 @@ BOOL CommReadFile(HANDLE hDevice, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
assert(event == FREERDP_PURGE_RXABORT); /* no other expected event so far */
|
||||
}
|
||||
|
||||
|
||||
if (FD_ISSET(pComm->fd_read, &read_set))
|
||||
{
|
||||
ssize_t nbRead = 0;
|
||||
@ -361,7 +358,7 @@ BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite
|
||||
LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped)
|
||||
{
|
||||
WINPR_COMM* pComm = (WINPR_COMM*) hDevice;
|
||||
struct timeval tmaxTimeout, *pTmaxTimeout;
|
||||
struct timeval tmaxTimeout;
|
||||
|
||||
EnterCriticalSection(&pComm->WriteLock); /* KISSer by the function's beginning */
|
||||
|
||||
@ -409,15 +406,12 @@ BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite
|
||||
* how much time was left. Keep the timeout variable out of
|
||||
* the while() */
|
||||
|
||||
pTmaxTimeout = NULL; /* no timeout if Tmax == 0 */
|
||||
if (Tmax > 0)
|
||||
|
||||
ZeroMemory(&tmaxTimeout, sizeof(struct timeval));
|
||||
if (Tmax > 0) /* no timeout if Tmax == 0 */
|
||||
{
|
||||
ZeroMemory(&tmaxTimeout, sizeof(struct timeval));
|
||||
|
||||
tmaxTimeout.tv_sec = Tmax / 1000; /* s */
|
||||
tmaxTimeout.tv_usec = (Tmax % 1000) * 1000; /* us */
|
||||
|
||||
pTmaxTimeout = &tmaxTimeout;
|
||||
}
|
||||
|
||||
while (*lpNumberOfBytesWritten < nNumberOfBytesToWrite)
|
||||
@ -439,7 +433,7 @@ BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite
|
||||
FD_SET(pComm->fd_write_event, &event_set);
|
||||
FD_SET(pComm->fd_write, &write_set);
|
||||
|
||||
nbFds = select(biggestFd+1, &event_set, &write_set, NULL, pTmaxTimeout);
|
||||
nbFds = select(biggestFd+1, &event_set, &write_set, NULL, &tmaxTimeout);
|
||||
if (nbFds < 0)
|
||||
{
|
||||
CommLog_Print(WLOG_WARN, "select() failure, errno=[%d] %s\n", errno, strerror(errno));
|
||||
|
@ -580,6 +580,7 @@ BOOL TerminateThread(HANDLE hThread, DWORD dwExitCode)
|
||||
WLog_ERR(TAG, "Function not supported on this platform!");
|
||||
#endif
|
||||
pthread_mutex_unlock(&thread->mutex);
|
||||
set_event(thread);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user