mfreerdp-server: fixed some conditions that will crash the server
This commit is contained in:
parent
0f29376911
commit
a060c8894d
@ -86,7 +86,29 @@ void (^streamHandler)(CGDisplayStreamFrameStatus, uint64_t, IOSurfaceRef, CGDisp
|
||||
dispatch_semaphore_signal(data_sem);
|
||||
}
|
||||
|
||||
if (lastUpdate == NULL)
|
||||
if (status != kCGDisplayStreamFrameStatusFrameComplete)
|
||||
{
|
||||
//unhandled
|
||||
switch(status)
|
||||
{
|
||||
case kCGDisplayStreamFrameStatusFrameIdle:
|
||||
printf("kCGDisplayStreamFrameStatusFrameIdle\n");
|
||||
break;
|
||||
|
||||
case kCGDisplayStreamFrameStatusStopped:
|
||||
printf("kCGDisplayStreamFrameStatusStopped\n");
|
||||
break;
|
||||
|
||||
case kCGDisplayStreamFrameStatusFrameBlank:
|
||||
printf("kCGDisplayStreamFrameStatusFrameBlank\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Unhandled Frame Status!!!\n");
|
||||
|
||||
}
|
||||
}
|
||||
else if (lastUpdate == NULL)
|
||||
{
|
||||
CFRetain(updateRef);
|
||||
lastUpdate = updateRef;
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include "mf_peer.h"
|
||||
#include "mf_info.h"
|
||||
#include "mf_event.h"
|
||||
@ -504,8 +506,8 @@ void* mf_peer_main_loop(void* arg)
|
||||
mf_peer_init(client);
|
||||
|
||||
/* Initialize the real server settings here */
|
||||
client->settings->CertificateFile = "server.crt";
|
||||
client->settings->PrivateKeyFile = "server.key";
|
||||
client->settings->CertificateFile = _strdup("server.crt");
|
||||
client->settings->PrivateKeyFile = _strdup("server.key");
|
||||
client->settings->NlaSecurity = FALSE;
|
||||
client->settings->RemoteFxCodec = TRUE;
|
||||
client->settings->SuppressOutput = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user