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,
|
||||
UINT32 dataLength)
|
||||
{
|
||||
UINT32 status;
|
||||
status = cliprdr->channelEntryPoints.pVirtualChannelOpenEx(
|
||||
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;
|
||||
}
|
||||
WINPR_ASSERT(cliprdr);
|
||||
WINPR_ASSERT(cliprdr->context);
|
||||
|
||||
cliprdr->MsgsHandle = channel_client_create_handler(
|
||||
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 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);
|
||||
|
||||
|
@ -1168,7 +1158,9 @@ static UINT encomsp_virtual_channel_event_connected(encomspPlugin* encomsp, LPVO
|
|||
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)
|
||||
{
|
||||
RailClientContext* context = rail_get_client_interface(rail);
|
||||
UINT status;
|
||||
status = rail->channelEntryPoints.pVirtualChannelOpenEx(rail->InitHandle, &rail->OpenHandle,
|
||||
rail->channelDef.name,
|
||||
rail_virtual_channel_open_event_ex);
|
||||
UINT status = CHANNEL_RC_OK;
|
||||
|
||||
if (status != CHANNEL_RC_OK)
|
||||
{
|
||||
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08" PRIX32 "]",
|
||||
WTSErrorToString(status), status);
|
||||
return status;
|
||||
}
|
||||
WINPR_ASSERT(rail);
|
||||
|
||||
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_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)
|
||||
puts("rdp2tcp connected");
|
||||
|
||||
WINPR_ASSERT(plugin);
|
||||
WINPR_ASSERT(plugin->channelEntryPoints.pVirtualChannelOpenEx);
|
||||
if (plugin->channelEntryPoints.pVirtualChannelOpenEx(
|
||||
pInitHandle, &plugin->openHandle, RDP2TCP_DVC_CHANNEL_NAME,
|
||||
VirtualChannelOpenEventEx) != CHANNEL_RC_OK)
|
||||
|
|
|
@ -1866,23 +1866,11 @@ static UINT rdpdr_virtual_channel_event_connected(rdpdrPlugin* rdpdr, LPVOID pDa
|
|||
UINT32 dataLength)
|
||||
{
|
||||
wObject* obj;
|
||||
UINT32 status;
|
||||
|
||||
WINPR_ASSERT(rdpdr);
|
||||
WINPR_UNUSED(pData);
|
||||
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);
|
||||
|
||||
if (!rdpdr->queue)
|
||||
|
@ -1901,7 +1889,9 @@ static UINT rdpdr_virtual_channel_event_connected(rdpdrPlugin* rdpdr, LPVOID pDa
|
|||
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(dataLength);
|
||||
|
||||
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);
|
||||
return status;
|
||||
}
|
||||
WINPR_ASSERT(rdpsnd);
|
||||
|
||||
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)
|
||||
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);
|
||||
fail:
|
||||
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,
|
||||
UINT32 dataLength)
|
||||
{
|
||||
UINT32 status;
|
||||
UINT error;
|
||||
status = remdesk->channelEntryPoints.pVirtualChannelOpenEx(
|
||||
remdesk->InitHandle, &remdesk->OpenHandle, remdesk->channelDef.name,
|
||||
remdesk_virtual_channel_open_event_ex);
|
||||
|
||||
if (status != CHANNEL_RC_OK)
|
||||
{
|
||||
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08" PRIX32 "]",
|
||||
WTSErrorToString(status), status);
|
||||
return status;
|
||||
}
|
||||
WINPR_ASSERT(remdesk);
|
||||
|
||||
remdesk->queue = MessageQueue_New(NULL);
|
||||
|
||||
|
@ -899,7 +890,9 @@ static UINT remdesk_virtual_channel_event_connected(remdeskPlugin* remdesk, LPVO
|
|||
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:
|
||||
MessageQueue_Free(remdesk->queue);
|
||||
remdesk->queue = NULL;
|
||||
|
|
Loading…
Reference in New Issue