rdpsnd: always call rdpsnd_server_send_formats
Since the rdpsnd_server_send_formats function is no longer exported we must always call it, even if the rdpsnd server application uses its own thread.
This commit is contained in:
parent
305f5d1bd5
commit
d35470f8af
@ -238,12 +238,6 @@ static DWORD WINAPI rdpsnd_server_thread(LPVOID arg)
|
||||
events[nCount++] = context->priv->channelEvent;
|
||||
events[nCount++] = context->priv->StopEvent;
|
||||
|
||||
if ((error = rdpsnd_server_send_formats(context, context->priv->rdpsnd_pdu)))
|
||||
{
|
||||
WLog_ERR(TAG, "rdpsnd_server_send_formats failed with error %"PRIu32"", error);
|
||||
goto out;
|
||||
}
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
status = WaitForMultipleObjects(nCount, events, FALSE, INFINITE);
|
||||
@ -274,8 +268,6 @@ static DWORD WINAPI rdpsnd_server_thread(LPVOID arg)
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
if (error && context->rdpcontext)
|
||||
setChannelError(context->rdpcontext, error,
|
||||
"rdpsnd_server_thread reported an error");
|
||||
@ -696,6 +688,12 @@ static UINT rdpsnd_server_start(RdpsndServerContext* context)
|
||||
goto out_pdu;
|
||||
}
|
||||
|
||||
if ((error = rdpsnd_server_send_formats(context, context->priv->rdpsnd_pdu)))
|
||||
{
|
||||
WLog_ERR(TAG, "rdpsnd_server_send_formats failed with error %"PRIu32"", error);
|
||||
goto out_lock;
|
||||
}
|
||||
|
||||
if (priv->ownThread)
|
||||
{
|
||||
context->priv->StopEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
@ -717,6 +715,7 @@ static UINT rdpsnd_server_start(RdpsndServerContext* context)
|
||||
}
|
||||
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
out_stopEvent:
|
||||
CloseHandle(context->priv->StopEvent);
|
||||
context->priv->StopEvent = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user