Merge branch 'master' of github.com:awakecoding/FreeRDP

This commit is contained in:
Marc-André Moreau 2013-02-18 20:07:41 -05:00
commit 4e565e26b5
5 changed files with 32 additions and 8 deletions

View File

@ -169,7 +169,7 @@ int freerdp_client_print_command_line_help(int argc, char** argv)
if (arg->Format)
{
length = strlen(arg->Name) + strlen(arg->Format) + 2;
str = malloc(length + 1);
str = (char*) malloc(length + 1);
sprintf_s(str, length + 1, "%s:%s", arg->Name, arg->Format);
printf("%-20s", str);
free(str);
@ -184,7 +184,7 @@ int freerdp_client_print_command_line_help(int argc, char** argv)
else if (arg->Flags & COMMAND_LINE_VALUE_BOOL)
{
length = strlen(arg->Name) + 32;
str = malloc(length + 1);
str = (char*) malloc(length + 1);
sprintf_s(str, length + 1, "%s (default:%s)", arg->Name,
arg->Default ? "on" : "off");
@ -447,7 +447,7 @@ char** freerdp_command_line_parse_comma_separated_values_offset(char* list, int*
int freerdp_client_command_line_post_filter(void* context, COMMAND_LINE_ARGUMENT_A* arg)
{
rdpSettings* settings;
rdpSettings* settings = (rdpSettings*) context;
CommandLineSwitchStart(arg)
@ -455,7 +455,6 @@ int freerdp_client_command_line_post_filter(void* context, COMMAND_LINE_ARGUMENT
{
char** p;
int count;
settings = (rdpSettings*) context;
p = freerdp_command_line_parse_comma_separated_values(arg->Value, &count);
@ -470,7 +469,6 @@ int freerdp_client_command_line_post_filter(void* context, COMMAND_LINE_ARGUMENT
{
char** p;
int count;
settings = (rdpSettings*) context;
p = freerdp_command_line_parse_comma_separated_values(arg->Value, &count);
@ -482,7 +480,6 @@ int freerdp_client_command_line_post_filter(void* context, COMMAND_LINE_ARGUMENT
{
char** p;
int count;
settings = (rdpSettings*) context;
p = freerdp_command_line_parse_comma_separated_values(arg->Value, &count);

View File

@ -395,6 +395,8 @@ void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int heigh
cmd->destTop = y;
cmd->destRight = x + width;
cmd->destBottom = y + height;
XDestroyImage(image);
}
cmd->bpp = 32;

View File

@ -41,6 +41,10 @@ set(${MODULE_PREFIX}_SRCS
ndr_union.h
midl.c)
if(MSVC AND (NOT MONOLITHIC_BUILD))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()
add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
MONOLITHIC ${MONOLITHIC_BUILD}
SOURCES ${${MODULE_PREFIX}_SRCS})
@ -55,6 +59,7 @@ set(${MODULE_PREFIX}_LIBS
if(WIN32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rpcrt4)
else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES})
endif()

View File

@ -0,0 +1,3 @@
LIBRARY "libwinpr-rpc"
EXPORTS

View File

@ -26,6 +26,14 @@ BYTE test_DummyMessage[64] =
0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD
};
BYTE test_LastDummyMessage[64] =
{
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
int schannel_send(PSecurityFunctionTable table, HANDLE hPipe, PCtxtHandle phContext, BYTE* buffer, UINT32 length)
{
BYTE* ioBuffer;
@ -154,6 +162,9 @@ int schannel_recv(PSecurityFunctionTable table, HANDLE hPipe, PCtxtHandle phCont
printf("Decrypted Message (%d)\n", Message.pBuffers[1].cbBuffer);
winpr_HexDump((BYTE*) Message.pBuffers[1].pvBuffer, Message.pBuffers[1].cbBuffer);
if (memcmp(Message.pBuffers[1].pvBuffer, test_LastDummyMessage, sizeof(test_LastDummyMessage)) == 0)
return -1;
return 0;
}
@ -371,6 +382,7 @@ static void* schannel_test_server_thread(void* arg)
int TestSchannel(int argc, char* argv[])
{
int count;
int index;
ALG_ID algId;
HANDLE thread;
@ -606,6 +618,8 @@ int TestSchannel(int argc, char* argv[])
}
while(1);
count = 0;
do
{
if (schannel_send(table, g_ServerWritePipe, &context, test_DummyMessage, sizeof(test_DummyMessage)) < 0)
@ -628,9 +642,12 @@ int TestSchannel(int argc, char* argv[])
test_DummyMessage[index] = b;
}
Sleep(1000 * 10);
Sleep(100);
count++;
}
while(1);
while(count < 3);
schannel_send(table, g_ServerWritePipe, &context, test_LastDummyMessage, sizeof(test_LastDummyMessage));
WaitForSingleObject(thread, INFINITE);