Reverted WTS API changes.

This commit is contained in:
Armin Novak 2016-03-14 13:19:08 +01:00
parent d06723e297
commit 2dbc1a0b87
9 changed files with 21 additions and 33 deletions

View File

@ -1257,7 +1257,7 @@ static UINT cliprdr_virtual_channel_event_terminated(cliprdrPlugin* cliprdr)
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
static UINT VCAPITYPE cliprdr_virtual_channel_init_event(LPVOID pInitHandle, static VOID VCAPITYPE cliprdr_virtual_channel_init_event(LPVOID pInitHandle,
UINT event, LPVOID pData, UINT event, LPVOID pData,
UINT dataLength) UINT dataLength)
{ {
@ -1269,7 +1269,7 @@ static UINT VCAPITYPE cliprdr_virtual_channel_init_event(LPVOID pInitHandle,
if (!cliprdr) if (!cliprdr)
{ {
WLog_ERR(TAG, "error no match"); WLog_ERR(TAG, "error no match");
return CHANNEL_RC_BAD_INIT_HANDLE; return;
} }
switch (event) switch (event)
@ -1291,8 +1291,6 @@ static UINT VCAPITYPE cliprdr_virtual_channel_init_event(LPVOID pInitHandle,
} }
if (error && cliprdr->context->rdpcontext) if (error && cliprdr->context->rdpcontext)
setChannelError(cliprdr->context->rdpcontext, error, "cliprdr_virtual_channel_init_event reported an error"); setChannelError(cliprdr->context->rdpcontext, error, "cliprdr_virtual_channel_init_event reported an error");
return error;
} }
/* cliprdr is always built-in */ /* cliprdr is always built-in */

View File

@ -1501,7 +1501,7 @@ static UINT drdynvc_virtual_channel_event_terminated(drdynvcPlugin* drdynvc)
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
static UINT VCAPITYPE drdynvc_virtual_channel_init_event(LPVOID pInitHandle, static VOID VCAPITYPE drdynvc_virtual_channel_init_event(LPVOID pInitHandle,
UINT event, LPVOID pData, UINT event, LPVOID pData,
UINT dataLength) UINT dataLength)
{ {
@ -1513,7 +1513,7 @@ static UINT VCAPITYPE drdynvc_virtual_channel_init_event(LPVOID pInitHandle,
if (!drdynvc) if (!drdynvc)
{ {
WLog_ERR(TAG, "drdynvc_virtual_channel_init_event: error no match"); WLog_ERR(TAG, "drdynvc_virtual_channel_init_event: error no match");
return CHANNEL_RC_BAD_INIT_HANDLE; return;
} }
switch (event) switch (event)
@ -1535,8 +1535,6 @@ static UINT VCAPITYPE drdynvc_virtual_channel_init_event(LPVOID pInitHandle,
} }
if (error && drdynvc->rdpcontext) if (error && drdynvc->rdpcontext)
setChannelError(drdynvc->rdpcontext, error, "drdynvc_virtual_channel_init_event reported an error"); setChannelError(drdynvc->rdpcontext, error, "drdynvc_virtual_channel_init_event reported an error");
return error;
} }
/** /**

View File

@ -1259,7 +1259,7 @@ static UINT encomsp_virtual_channel_event_terminated(encomspPlugin* encomsp)
return CHANNEL_RC_OK; return CHANNEL_RC_OK;
} }
static UINT VCAPITYPE encomsp_virtual_channel_init_event(LPVOID pInitHandle, static VOID VCAPITYPE encomsp_virtual_channel_init_event(LPVOID pInitHandle,
UINT event, LPVOID pData, UINT event, LPVOID pData,
UINT dataLength) UINT dataLength)
{ {
@ -1271,7 +1271,7 @@ static UINT VCAPITYPE encomsp_virtual_channel_init_event(LPVOID pInitHandle,
if (!encomsp) if (!encomsp)
{ {
WLog_ERR(TAG, "encomsp_virtual_channel_init_event: error no match"); WLog_ERR(TAG, "encomsp_virtual_channel_init_event: error no match");
return CHANNEL_RC_BAD_INIT_HANDLE; return;
} }
switch (event) switch (event)
@ -1295,8 +1295,6 @@ static UINT VCAPITYPE encomsp_virtual_channel_init_event(LPVOID pInitHandle,
if (error && encomsp->rdpcontext) if (error && encomsp->rdpcontext)
setChannelError(encomsp->rdpcontext, error, "encomsp_virtual_channel_init_event reported an error"); setChannelError(encomsp->rdpcontext, error, "encomsp_virtual_channel_init_event reported an error");
return error;
} }
/* encomsp is always built-in */ /* encomsp is always built-in */

View File

@ -776,7 +776,7 @@ static void rail_virtual_channel_event_terminated(railPlugin* rail)
free(rail); free(rail);
} }
static UINT VCAPITYPE rail_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength) static VOID VCAPITYPE rail_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{ {
railPlugin* rail; railPlugin* rail;
UINT error = CHANNEL_RC_OK; UINT error = CHANNEL_RC_OK;
@ -786,7 +786,7 @@ static UINT VCAPITYPE rail_virtual_channel_init_event(LPVOID pInitHandle, UINT e
if (!rail) if (!rail)
{ {
WLog_ERR(TAG, "rail_virtual_channel_init_event: error no match"); WLog_ERR(TAG, "rail_virtual_channel_init_event: error no match");
return CHANNEL_RC_BAD_INIT_HANDLE; return;
} }
switch (event) switch (event)
@ -808,8 +808,6 @@ static UINT VCAPITYPE rail_virtual_channel_init_event(LPVOID pInitHandle, UINT e
if(error && rail->rdpcontext) if(error && rail->rdpcontext)
setChannelError(rail->rdpcontext, error, "rail_virtual_channel_init_event reported an error"); setChannelError(rail->rdpcontext, error, "rail_virtual_channel_init_event reported an error");
return error;
} }
/* rail is always built-in */ /* rail is always built-in */

View File

@ -1720,7 +1720,7 @@ static void rdpdr_virtual_channel_event_terminated(rdpdrPlugin* rdpdr)
free(rdpdr); free(rdpdr);
} }
static UINT VCAPITYPE rdpdr_virtual_channel_init_event(LPVOID pInitHandle, UINT event, static VOID VCAPITYPE rdpdr_virtual_channel_init_event(LPVOID pInitHandle, UINT event,
LPVOID pData, UINT dataLength) LPVOID pData, UINT dataLength)
{ {
rdpdrPlugin* rdpdr; rdpdrPlugin* rdpdr;
@ -1731,7 +1731,7 @@ static UINT VCAPITYPE rdpdr_virtual_channel_init_event(LPVOID pInitHandle, UINT
if (!rdpdr) if (!rdpdr)
{ {
WLog_ERR(TAG, "error no match"); WLog_ERR(TAG, "error no match");
return CHANNEL_RC_BAD_INIT_HANDLE; return;
} }
switch (event) switch (event)
@ -1759,7 +1759,6 @@ static UINT VCAPITYPE rdpdr_virtual_channel_init_event(LPVOID pInitHandle, UINT
if (error && rdpdr->rdpcontext) if (error && rdpdr->rdpcontext)
setChannelError(rdpdr->rdpcontext, error, "rdpdr_virtual_channel_init_event reported an error"); setChannelError(rdpdr->rdpcontext, error, "rdpdr_virtual_channel_init_event reported an error");
return error;
} }
/* rdpdr is always built-in */ /* rdpdr is always built-in */

View File

@ -1450,7 +1450,7 @@ static void rdpsnd_virtual_channel_event_terminated(rdpsndPlugin* rdpsnd)
free(rdpsnd); free(rdpsnd);
} }
static UINT VCAPITYPE rdpsnd_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength) static VOID VCAPITYPE rdpsnd_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{ {
rdpsndPlugin* plugin; rdpsndPlugin* plugin;
UINT error = CHANNEL_RC_OK; UINT error = CHANNEL_RC_OK;
@ -1460,7 +1460,7 @@ static UINT VCAPITYPE rdpsnd_virtual_channel_init_event(LPVOID pInitHandle, UINT
if (!plugin) if (!plugin)
{ {
WLog_ERR(TAG, "rdpsnd_virtual_channel_init_event: error no match"); WLog_ERR(TAG, "rdpsnd_virtual_channel_init_event: error no match");
return CHANNEL_RC_BAD_INIT_HANDLE; return;
} }
switch (event) switch (event)
@ -1481,7 +1481,6 @@ static UINT VCAPITYPE rdpsnd_virtual_channel_init_event(LPVOID pInitHandle, UINT
} }
if (error && plugin->rdpcontext) if (error && plugin->rdpcontext)
setChannelError(plugin->rdpcontext, error, "rdpsnd_virtual_channel_init_event reported an error"); setChannelError(plugin->rdpcontext, error, "rdpsnd_virtual_channel_init_event reported an error");
return error;
} }
/* rdpsnd is always built-in */ /* rdpsnd is always built-in */

View File

@ -1066,7 +1066,7 @@ static void remdesk_virtual_channel_event_terminated(remdeskPlugin* remdesk)
free(remdesk); free(remdesk);
} }
static UINT VCAPITYPE remdesk_virtual_channel_init_event(LPVOID pInitHandle, static VOID VCAPITYPE remdesk_virtual_channel_init_event(LPVOID pInitHandle,
UINT event, LPVOID pData, UINT event, LPVOID pData,
UINT dataLength) UINT dataLength)
{ {
@ -1078,7 +1078,7 @@ static UINT VCAPITYPE remdesk_virtual_channel_init_event(LPVOID pInitHandle,
if (!remdesk) if (!remdesk)
{ {
WLog_ERR(TAG, "error no match"); WLog_ERR(TAG, "error no match");
return CHANNEL_RC_BAD_INIT_HANDLE; return;
} }
switch (event) switch (event)
@ -1099,8 +1099,6 @@ static UINT VCAPITYPE remdesk_virtual_channel_init_event(LPVOID pInitHandle,
} }
if (error && remdesk->rdpcontext) if (error && remdesk->rdpcontext)
setChannelError(remdesk->rdpcontext, error, "remdesk_virtual_channel_init_event reported an error"); setChannelError(remdesk->rdpcontext, error, "remdesk_virtual_channel_init_event reported an error");
return error;
} }
/* remdesk is always built-in */ /* remdesk is always built-in */

View File

@ -213,10 +213,10 @@ UINT freerdp_channels_pre_connect(rdpChannels* channels, freerdp* instance)
pChannelClientData = &channels->clientDataList[index]; pChannelClientData = &channels->clientDataList[index];
if (pChannelClientData->pChannelInitEventProc) if (pChannelClientData->pChannelInitEventProc)
error = pChannelClientData->pChannelInitEventProc( pChannelClientData->pChannelInitEventProc(
pChannelClientData->pInitHandle, pChannelClientData->pInitHandle,
CHANNEL_EVENT_INITIALIZED, 0, 0); CHANNEL_EVENT_INITIALIZED, 0, 0);
if (CHANNEL_RC_OK != error) if (CHANNEL_RC_OK != getChannelError(instance->context))
break; break;
} }
@ -252,9 +252,9 @@ UINT freerdp_channels_post_connect(rdpChannels* channels, freerdp* instance)
pChannelOpenData = &channels->openDataList[index]; pChannelOpenData = &channels->openDataList[index];
error = pChannelClientData->pChannelInitEventProc(pChannelClientData->pInitHandle, pChannelClientData->pChannelInitEventProc(pChannelClientData->pInitHandle,
CHANNEL_EVENT_CONNECTED, hostname, hostnameLength); CHANNEL_EVENT_CONNECTED, hostname, hostnameLength);
if (error != CHANNEL_RC_OK) if (getChannelError(instance->context) != CHANNEL_RC_OK)
goto fail; goto fail;
name = (char*) malloc(9); name = (char*) malloc(9);
@ -473,10 +473,10 @@ UINT freerdp_channels_disconnect(rdpChannels* channels, freerdp* instance)
pChannelClientData = &channels->clientDataList[index]; pChannelClientData = &channels->clientDataList[index];
if (pChannelClientData->pChannelInitEventProc) if (pChannelClientData->pChannelInitEventProc)
error = pChannelClientData->pChannelInitEventProc( pChannelClientData->pChannelInitEventProc(
pChannelClientData->pInitHandle, pChannelClientData->pInitHandle,
CHANNEL_EVENT_DISCONNECTED, 0, 0); CHANNEL_EVENT_DISCONNECTED, 0, 0);
if (error != CHANNEL_RC_OK) if (getChannelError(instance->context) != CHANNEL_RC_OK)
goto fail; goto fail;
pChannelOpenData = &channels->openDataList[index]; pChannelOpenData = &channels->openDataList[index];

View File

@ -116,7 +116,7 @@ typedef struct tagCHANNEL_PDU_HEADER
#define VCEXPORT __export #define VCEXPORT __export
#endif #endif
typedef UINT VCAPITYPE CHANNEL_INIT_EVENT_FN(LPVOID pInitHandle, typedef VOID VCAPITYPE CHANNEL_INIT_EVENT_FN(LPVOID pInitHandle,
UINT event, LPVOID pData, UINT dataLength); UINT event, LPVOID pData, UINT dataLength);
typedef CHANNEL_INIT_EVENT_FN *PCHANNEL_INIT_EVENT_FN; typedef CHANNEL_INIT_EVENT_FN *PCHANNEL_INIT_EVENT_FN;