freerdp: fix build on Windows

This commit is contained in:
Marc-André Moreau 2013-10-30 17:56:44 -04:00
parent 3b0bcc9824
commit 938d423ec9
3 changed files with 30 additions and 20 deletions

View File

@ -113,6 +113,7 @@ int credssp_ntlm_client_init(rdpCredssp* credssp)
{
char* spn;
int length;
rdpTls* tls = NULL;
freerdp* instance;
rdpSettings* settings;
@ -138,12 +139,16 @@ int credssp_ntlm_client_init(rdpCredssp* credssp)
(char*) credssp->identity.User, (char*) credssp->identity.Domain, (char*) credssp->identity.Password);
#endif
rdpTls *tls = NULL;
if(credssp->transport->layer == TRANSPORT_LAYER_TLS) {
if (credssp->transport->layer == TRANSPORT_LAYER_TLS)
{
tls = credssp->transport->TlsIn;
} else if(credssp->transport->layer == TRANSPORT_LAYER_TSG_TLS) {
}
else if (credssp->transport->layer == TRANSPORT_LAYER_TSG_TLS)
{
tls = credssp->transport->TsgTls;
} else {
}
else
{
fprintf(stderr, "Unknown NLA transport layer\n");
return 0;
}

View File

@ -6,6 +6,7 @@
int TestEnvironmentGetSetEB(int argc, char* argv[])
{
#ifndef _WIN32
char test[1024];
TCHAR* p;
int length;
@ -17,7 +18,6 @@ int TestEnvironmentGetSetEB(int argc, char* argv[])
p = (LPSTR) malloc(length);
length = GetEnvironmentVariableEBA(lpszEnvironmentBlock,"DISPLAY", p, length);
printf("GetEnvironmentVariableA(WINPR_TEST_VARIABLE) = %s\n" , p);
if (strcmp(p, "WINPR_TEST_VALUE") != 0)
@ -27,35 +27,40 @@ int TestEnvironmentGetSetEB(int argc, char* argv[])
free(p);
lpszEnvironmentBlockNew = (LPTCH)malloc(1024);
lpszEnvironmentBlockNew = (LPTCH) malloc(1024);
memcpy(lpszEnvironmentBlockNew,lpszEnvironmentBlock,56);
if (SetEnvironmentVariableEBA(&lpszEnvironmentBlockNew,"test","5") ) {
if (GetEnvironmentVariableEBA(lpszEnvironmentBlockNew,"test", test, 1023) ) {
if (strcmp(test,"5") != 0) {
if (SetEnvironmentVariableEBA(&lpszEnvironmentBlockNew, "test", "5"))
{
if (GetEnvironmentVariableEBA(lpszEnvironmentBlockNew,"test", test, 1023))
{
if (strcmp(test,"5") != 0)
{
return -1;
}
} else {
}
else
{
return -1;
}
}
//free(lpszEnvironmentBlockNew);
if (SetEnvironmentVariableEBA(&lpszEnvironmentBlockNew,"test",NULL) ) {
if (GetEnvironmentVariableEBA(lpszEnvironmentBlockNew,"test", test, 1023) ) {
if (SetEnvironmentVariableEBA(&lpszEnvironmentBlockNew, "test", NULL))
{
if (GetEnvironmentVariableEBA(lpszEnvironmentBlockNew,"test", test, 1023))
{
return -1;
} else {
}
else
{
// not found .. this is expected
}
}
free(lpszEnvironmentBlockNew);
#endif
return 0;
}

View File

@ -6,6 +6,7 @@
int TestEnvironmentMergeEnvironmentStrings(int argc, char* argv[])
{
#ifndef _WIN32
TCHAR* p;
int length;
LPTCH lpszEnvironmentBlock;
@ -17,8 +18,6 @@ int TestEnvironmentMergeEnvironmentStrings(int argc, char* argv[])
p = (TCHAR*) lpszMergedEnvironmentBlock;
while (p[0] && p[1])
{
printf("%s\n", p);
@ -27,6 +26,7 @@ int TestEnvironmentMergeEnvironmentStrings(int argc, char* argv[])
}
FreeEnvironmentStrings(lpszEnvironmentBlock);
#endif
return 0;
}