Merge pull request #3 from bmiklautz/pull/2785

Misc fixes
This commit is contained in:
MartinHaimberger 2015-07-30 11:05:00 +02:00
commit c605e32b6b
7 changed files with 42 additions and 13 deletions

View File

@ -70,7 +70,7 @@ endif()
set(WITH_LIBRARY_VERSIONING "ON")
set(FREERDP_VERSION_MAJOR "1")
set(FREERDP_VERSION_MINOR "2")
set(FREERDP_VERSION_REVISION "4")
set(FREERDP_VERSION_REVISION "5")
set(FREERDP_VERSION_SUFFIX "dev")
set(FREERDP_API_VERSION "${FREERDP_VERSION_MAJOR}.${FREERDP_VERSION_MINOR}")
set(FREERDP_VERSION "${FREERDP_API_VERSION}.${FREERDP_VERSION_REVISION}")

View File

@ -1169,8 +1169,7 @@ static void VCAPITYPE encomsp_virtual_channel_init_event(LPVOID pInitHandle, UIN
encomsp_virtual_channel_event_terminated(encomsp);
break;
default:
WLog_ERR(TAG, "uknown event type %d", event);
error = ERROR_INVALID_DATA;
WLog_ERR(TAG, "Unhandled event type %d", event);
}
if (error && encomsp->rdpcontext)

View File

@ -851,7 +851,6 @@ static WIN32ERROR rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
WLog_ERR(TAG, "rdpdr_send_client_name_request failed with error %lu", error);
return error;
}
if ((error = rdpdr_process_init(rdpdr)))
{
WLog_ERR(TAG, "rdpdr_process_init failed with error %lu", error);
@ -909,13 +908,28 @@ static WIN32ERROR rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
}
else if (component == RDPDR_CTYP_PRN)
{
WLog_ERR(TAG, "RDPDR_CTYP_PRN unknown PacketId: 0x%04X", packetId);
return ERROR_INVALID_DATA;
switch (packetId)
{
case PAKID_PRN_CACHE_DATA:
{
UINT32 eventID;
Stream_Read_UINT32(s, eventID);
WLog_ERR(TAG, "Ignoring unhandled message PAKID_PRN_CACHE_DATA (EventID: 0x%04X)", eventID);
}
break;
case PAKID_PRN_USING_XPS:
WLog_ERR(TAG, "Ignoring unhandled message PAKID_PRN_USING_XPS");
break;
default:
WLog_ERR(TAG, "Unknown printing component packetID: 0x%04X", packetId);
return ERROR_INVALID_DATA;
}
}
else
{
WLog_ERR(TAG, "unknown message: Component: 0x%04X PacketId: 0x%04X",
component, packetId);
WLog_ERR(TAG, "Unknown message: Component: 0x%04X PacketId: 0x%04X", component, packetId);
return ERROR_INVALID_DATA;
}

View File

@ -254,7 +254,8 @@ static WIN32ERROR remdesk_send_ctl_version_info_pdu(remdeskPlugin* remdesk)
if ((error = remdesk_virtual_channel_write(remdesk, s)))
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error);
Stream_Free(s, TRUE);
if (error != CHANNEL_RC_OK)
Stream_Free(s, TRUE);
return error;
}
@ -340,7 +341,8 @@ static WIN32ERROR remdesk_send_ctl_authenticate_pdu(remdeskPlugin* remdesk)
out:
free(raConnectionStringW);
free(expertBlobW);
Stream_Free(s, TRUE);
if (error != CHANNEL_RC_OK)
Stream_Free(s, TRUE);
return error;
}
@ -387,7 +389,8 @@ static WIN32ERROR remdesk_send_ctl_remote_control_desktop_pdu(remdeskPlugin* rem
out:
free(raConnectionStringW);
Stream_Free(s, TRUE);
if (error != CHANNEL_RC_OK)
Stream_Free(s, TRUE);
return error;
}
@ -440,7 +443,8 @@ static WIN32ERROR remdesk_send_ctl_verify_password_pdu(remdeskPlugin* remdesk)
out:
free(expertBlobW);
Stream_Free(s, TRUE);
if (error != CHANNEL_RC_OK)
Stream_Free(s, TRUE);
return error;
}
@ -788,7 +792,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_open_event(DWORD openHandle, UINT
LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
{
remdeskPlugin* remdesk;
WIN32ERROR error;
WIN32ERROR error = CHANNEL_RC_OK;
remdesk = (remdeskPlugin*) remdesk_get_open_handle_data(openHandle);
@ -811,6 +815,11 @@ static VOID VCAPITYPE remdesk_virtual_channel_open_event(DWORD openHandle, UINT
case CHANNEL_EVENT_USER:
break;
default:
WLog_ERR(TAG, "unhandled event %lu!", event);
error = ERROR_INTERNAL_ERROR;
}
if (error && remdesk->rdpcontext)
setChannelError(remdesk->rdpcontext, error, "remdesk_virtual_channel_open_event reported an error");

View File

@ -22,6 +22,7 @@
#define FREERDP_CHANNEL_CLIENT_RDPSND_H
#include <freerdp/channels/rdpsnd.h>
#include <winpr/win32error.h>
/**
* Subsystem Interface

View File

@ -673,7 +673,10 @@ UINT VCAPITYPE FreeRDP_VirtualChannelWrite(DWORD openHandle, LPVOID pData, ULONG
pChannelOpenEvent->pChannelOpenData = pChannelOpenData;
if (!MessageQueue_Post(channels->queue, (void*) channels, 0, (void*) pChannelOpenEvent, NULL))
{
free(pChannelOpenEvent);
return CHANNEL_RC_NO_MEMORY;
}
return CHANNEL_RC_OK;
}

View File

@ -929,6 +929,9 @@ void freerdp_settings_free(rdpSettings* settings)
free(settings->RedirectionPassword);
free(settings->RedirectionTsvUrl);
free(settings->RemoteAssistanceSessionId);
free(settings->RemoteAssistancePassword);
free(settings->RemoteAssistancePassStub);
free(settings->RemoteAssistanceRCTicket);
free(settings->AuthenticationServiceClass);
free(settings->GatewayHostname);
free(settings->GatewayUsername);