mirror of https://github.com/FreeRDP/FreeRDP
Fixed proxy ulimit graceful client disconnect
This commit is contained in:
parent
b336751861
commit
467f7c3f6a
|
@ -900,22 +900,18 @@ static VOID VCAPITYPE cliprdr_virtual_channel_open_event_ex(LPVOID lpUserParam,
|
||||||
static UINT cliprdr_virtual_channel_event_connected(cliprdrPlugin* cliprdr, LPVOID pData,
|
static UINT cliprdr_virtual_channel_event_connected(cliprdrPlugin* cliprdr, LPVOID pData,
|
||||||
UINT32 dataLength)
|
UINT32 dataLength)
|
||||||
{
|
{
|
||||||
UINT32 status;
|
WINPR_ASSERT(cliprdr);
|
||||||
status = cliprdr->channelEntryPoints.pVirtualChannelOpenEx(
|
WINPR_ASSERT(cliprdr->context);
|
||||||
cliprdr->InitHandle, &cliprdr->OpenHandle, cliprdr->channelDef.name,
|
|
||||||
cliprdr_virtual_channel_open_event_ex);
|
|
||||||
|
|
||||||
if (status != CHANNEL_RC_OK)
|
|
||||||
{
|
|
||||||
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08" PRIX32 "]",
|
|
||||||
WTSErrorToString(status), status);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
cliprdr->MsgsHandle = channel_client_create_handler(
|
cliprdr->MsgsHandle = channel_client_create_handler(
|
||||||
cliprdr->context->rdpcontext, cliprdr, cliprdr_order_recv, CLIPRDR_SVC_CHANNEL_NAME);
|
cliprdr->context->rdpcontext, cliprdr, cliprdr_order_recv, CLIPRDR_SVC_CHANNEL_NAME);
|
||||||
|
if (!cliprdr->MsgsHandle)
|
||||||
|
return ERROR_INTERNAL_ERROR;
|
||||||
|
|
||||||
return CHANNEL_RC_OK;
|
WINPR_ASSERT(cliprdr->channelEntryPoints.pVirtualChannelOpenEx);
|
||||||
|
return cliprdr->channelEntryPoints.pVirtualChannelOpenEx(
|
||||||
|
cliprdr->InitHandle, &cliprdr->OpenHandle, cliprdr->channelDef.name,
|
||||||
|
cliprdr_virtual_channel_open_event_ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1141,16 +1141,6 @@ static UINT encomsp_virtual_channel_event_connected(encomspPlugin* encomsp, LPVO
|
||||||
UINT32 dataLength)
|
UINT32 dataLength)
|
||||||
{
|
{
|
||||||
UINT32 status;
|
UINT32 status;
|
||||||
status = encomsp->channelEntryPoints.pVirtualChannelOpenEx(
|
|
||||||
encomsp->InitHandle, &encomsp->OpenHandle, encomsp->channelDef.name,
|
|
||||||
encomsp_virtual_channel_open_event_ex);
|
|
||||||
|
|
||||||
if (status != CHANNEL_RC_OK)
|
|
||||||
{
|
|
||||||
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08" PRIX32 "]",
|
|
||||||
WTSErrorToString(status), status);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
encomsp->queue = MessageQueue_New(NULL);
|
encomsp->queue = MessageQueue_New(NULL);
|
||||||
|
|
||||||
|
@ -1168,7 +1158,9 @@ static UINT encomsp_virtual_channel_event_connected(encomspPlugin* encomsp, LPVO
|
||||||
return ERROR_INTERNAL_ERROR;
|
return ERROR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CHANNEL_RC_OK;
|
return encomsp->channelEntryPoints.pVirtualChannelOpenEx(
|
||||||
|
encomsp->InitHandle, &encomsp->OpenHandle, encomsp->channelDef.name,
|
||||||
|
encomsp_virtual_channel_open_event_ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -570,17 +570,9 @@ static VOID VCAPITYPE rail_virtual_channel_open_event_ex(LPVOID lpUserParam, DWO
|
||||||
static UINT rail_virtual_channel_event_connected(railPlugin* rail, LPVOID pData, UINT32 dataLength)
|
static UINT rail_virtual_channel_event_connected(railPlugin* rail, LPVOID pData, UINT32 dataLength)
|
||||||
{
|
{
|
||||||
RailClientContext* context = rail_get_client_interface(rail);
|
RailClientContext* context = rail_get_client_interface(rail);
|
||||||
UINT status;
|
UINT status = CHANNEL_RC_OK;
|
||||||
status = rail->channelEntryPoints.pVirtualChannelOpenEx(rail->InitHandle, &rail->OpenHandle,
|
|
||||||
rail->channelDef.name,
|
|
||||||
rail_virtual_channel_open_event_ex);
|
|
||||||
|
|
||||||
if (status != CHANNEL_RC_OK)
|
WINPR_ASSERT(rail);
|
||||||
{
|
|
||||||
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08" PRIX32 "]",
|
|
||||||
WTSErrorToString(status), status);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context)
|
if (context)
|
||||||
{
|
{
|
||||||
|
@ -592,8 +584,13 @@ static UINT rail_virtual_channel_event_connected(railPlugin* rail, LPVOID pData,
|
||||||
}
|
}
|
||||||
rail->MsgsHandle = channel_client_create_handler(rail->rdpcontext, rail, rail_order_recv,
|
rail->MsgsHandle = channel_client_create_handler(rail->rdpcontext, rail, rail_order_recv,
|
||||||
RAIL_SVC_CHANNEL_NAME);
|
RAIL_SVC_CHANNEL_NAME);
|
||||||
|
if (!rail->MsgsHandle)
|
||||||
|
return ERROR_INTERNAL_ERROR;
|
||||||
|
|
||||||
return CHANNEL_RC_OK;
|
return rail->channelEntryPoints.pVirtualChannelOpenEx(rail->InitHandle, &rail->OpenHandle,
|
||||||
|
rail->channelDef.name,
|
||||||
|
rail_virtual_channel_open_event_ex);
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -286,6 +286,8 @@ static VOID VCAPITYPE VirtualChannelInitEventEx(LPVOID lpUserParam, LPVOID pInit
|
||||||
if (debug)
|
if (debug)
|
||||||
puts("rdp2tcp connected");
|
puts("rdp2tcp connected");
|
||||||
|
|
||||||
|
WINPR_ASSERT(plugin);
|
||||||
|
WINPR_ASSERT(plugin->channelEntryPoints.pVirtualChannelOpenEx);
|
||||||
if (plugin->channelEntryPoints.pVirtualChannelOpenEx(
|
if (plugin->channelEntryPoints.pVirtualChannelOpenEx(
|
||||||
pInitHandle, &plugin->openHandle, RDP2TCP_DVC_CHANNEL_NAME,
|
pInitHandle, &plugin->openHandle, RDP2TCP_DVC_CHANNEL_NAME,
|
||||||
VirtualChannelOpenEventEx) != CHANNEL_RC_OK)
|
VirtualChannelOpenEventEx) != CHANNEL_RC_OK)
|
||||||
|
|
|
@ -1866,23 +1866,11 @@ static UINT rdpdr_virtual_channel_event_connected(rdpdrPlugin* rdpdr, LPVOID pDa
|
||||||
UINT32 dataLength)
|
UINT32 dataLength)
|
||||||
{
|
{
|
||||||
wObject* obj;
|
wObject* obj;
|
||||||
UINT32 status;
|
|
||||||
|
|
||||||
WINPR_ASSERT(rdpdr);
|
WINPR_ASSERT(rdpdr);
|
||||||
WINPR_UNUSED(pData);
|
WINPR_UNUSED(pData);
|
||||||
WINPR_UNUSED(dataLength);
|
WINPR_UNUSED(dataLength);
|
||||||
|
|
||||||
status = rdpdr->channelEntryPoints.pVirtualChannelOpenEx(rdpdr->InitHandle, &rdpdr->OpenHandle,
|
|
||||||
rdpdr->channelDef.name,
|
|
||||||
rdpdr_virtual_channel_open_event_ex);
|
|
||||||
|
|
||||||
if (status != CHANNEL_RC_OK)
|
|
||||||
{
|
|
||||||
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08" PRIX32 "]",
|
|
||||||
WTSErrorToString(status), status);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
rdpdr->queue = MessageQueue_New(NULL);
|
rdpdr->queue = MessageQueue_New(NULL);
|
||||||
|
|
||||||
if (!rdpdr->queue)
|
if (!rdpdr->queue)
|
||||||
|
@ -1901,7 +1889,9 @@ static UINT rdpdr_virtual_channel_event_connected(rdpdrPlugin* rdpdr, LPVOID pDa
|
||||||
return ERROR_INTERNAL_ERROR;
|
return ERROR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CHANNEL_RC_OK;
|
return rdpdr->channelEntryPoints.pVirtualChannelOpenEx(rdpdr->InitHandle, &rdpdr->OpenHandle,
|
||||||
|
rdpdr->channelDef.name,
|
||||||
|
rdpdr_virtual_channel_open_event_ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1189,16 +1189,7 @@ static UINT rdpsnd_virtual_channel_event_connected(rdpsndPlugin* rdpsnd, LPVOID
|
||||||
WINPR_UNUSED(pData);
|
WINPR_UNUSED(pData);
|
||||||
WINPR_UNUSED(dataLength);
|
WINPR_UNUSED(dataLength);
|
||||||
|
|
||||||
status = rdpsnd->channelEntryPoints.pVirtualChannelOpenEx(
|
WINPR_ASSERT(rdpsnd);
|
||||||
rdpsnd->InitHandle, &rdpsnd->OpenHandle, rdpsnd->channelDef.name,
|
|
||||||
rdpsnd_virtual_channel_open_event_ex);
|
|
||||||
|
|
||||||
if (status != CHANNEL_RC_OK)
|
|
||||||
{
|
|
||||||
WLog_ERR(TAG, "%s pVirtualChannelOpenEx failed with %s [%08" PRIX32 "]",
|
|
||||||
rdpsnd_is_dyn_str(rdpsnd->dynamic), WTSErrorToString(status), status);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
rdpsnd->dsp_context = freerdp_dsp_context_new(FALSE);
|
rdpsnd->dsp_context = freerdp_dsp_context_new(FALSE);
|
||||||
|
|
||||||
|
@ -1210,6 +1201,17 @@ static UINT rdpsnd_virtual_channel_event_connected(rdpsndPlugin* rdpsnd, LPVOID
|
||||||
if (!rdpsnd->pool)
|
if (!rdpsnd->pool)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
status = rdpsnd->channelEntryPoints.pVirtualChannelOpenEx(
|
||||||
|
rdpsnd->InitHandle, &rdpsnd->OpenHandle, rdpsnd->channelDef.name,
|
||||||
|
rdpsnd_virtual_channel_open_event_ex);
|
||||||
|
|
||||||
|
if (status != CHANNEL_RC_OK)
|
||||||
|
{
|
||||||
|
WLog_ERR(TAG, "%s pVirtualChannelOpenEx failed with %s [%08" PRIX32 "]",
|
||||||
|
rdpsnd_is_dyn_str(rdpsnd->dynamic), WTSErrorToString(status), status);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
return rdpsnd_process_connect(rdpsnd);
|
return rdpsnd_process_connect(rdpsnd);
|
||||||
fail:
|
fail:
|
||||||
freerdp_dsp_context_free(rdpsnd->dsp_context);
|
freerdp_dsp_context_free(rdpsnd->dsp_context);
|
||||||
|
|
|
@ -867,18 +867,9 @@ static DWORD WINAPI remdesk_virtual_channel_client_thread(LPVOID arg)
|
||||||
static UINT remdesk_virtual_channel_event_connected(remdeskPlugin* remdesk, LPVOID pData,
|
static UINT remdesk_virtual_channel_event_connected(remdeskPlugin* remdesk, LPVOID pData,
|
||||||
UINT32 dataLength)
|
UINT32 dataLength)
|
||||||
{
|
{
|
||||||
UINT32 status;
|
|
||||||
UINT error;
|
UINT error;
|
||||||
status = remdesk->channelEntryPoints.pVirtualChannelOpenEx(
|
|
||||||
remdesk->InitHandle, &remdesk->OpenHandle, remdesk->channelDef.name,
|
|
||||||
remdesk_virtual_channel_open_event_ex);
|
|
||||||
|
|
||||||
if (status != CHANNEL_RC_OK)
|
WINPR_ASSERT(remdesk);
|
||||||
{
|
|
||||||
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08" PRIX32 "]",
|
|
||||||
WTSErrorToString(status), status);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
remdesk->queue = MessageQueue_New(NULL);
|
remdesk->queue = MessageQueue_New(NULL);
|
||||||
|
|
||||||
|
@ -899,7 +890,9 @@ static UINT remdesk_virtual_channel_event_connected(remdeskPlugin* remdesk, LPVO
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CHANNEL_RC_OK;
|
return remdesk->channelEntryPoints.pVirtualChannelOpenEx(
|
||||||
|
remdesk->InitHandle, &remdesk->OpenHandle, remdesk->channelDef.name,
|
||||||
|
remdesk_virtual_channel_open_event_ex);
|
||||||
error_out:
|
error_out:
|
||||||
MessageQueue_Free(remdesk->queue);
|
MessageQueue_Free(remdesk->queue);
|
||||||
remdesk->queue = NULL;
|
remdesk->queue = NULL;
|
||||||
|
|
Loading…
Reference in New Issue