don't crash when the key file doesn't exist

This allows to close the remaining issue in
https://bugs.freedesktop.org/show_bug.cgi?id=91390

Reviewed-by: Daniel Stone <daniels@collabora.com>
dev
David FORT 9 years ago committed by Daniel Stone
parent 82d4925b1a
commit 88249cdc28
  1. 14
      src/compositor-rdp.c

@ -1113,7 +1113,10 @@ rdp_peer_init(freerdp_peer *client, struct rdp_backend *b)
}
settings->NlaSecurity = FALSE;
client->Initialize(client);
if (!client->Initialize(client)) {
weston_log("peer initialization failed\n");
goto error_initialize;
}
settings->OsMajorType = OSMAJORTYPE_UNIX;
settings->OsMinorType = OSMINORTYPE_PSEUDO_XSERVER;
@ -1124,7 +1127,6 @@ rdp_peer_init(freerdp_peer *client, struct rdp_backend *b)
settings->FrameMarkerCommandEnabled = TRUE;
settings->SurfaceFrameMarkerEnabled = TRUE;
client->Capabilities = xf_peer_capabilities;
client->PostConnect = xf_peer_post_connect;
client->Activate = xf_peer_activate;
@ -1140,7 +1142,7 @@ rdp_peer_init(freerdp_peer *client, struct rdp_backend *b)
if (!client->GetFileDescriptor(client, rfds, &rcount)) {
weston_log("unable to retrieve client fds\n");
return -1;
goto error_initialize;
}
loop = wl_display_get_event_loop(b->compositor->wl_display);
@ -1155,6 +1157,10 @@ rdp_peer_init(freerdp_peer *client, struct rdp_backend *b)
wl_list_insert(&b->output->peers, &peerCtx->item.link);
return 0;
error_initialize:
client->Close(client);
return -1;
}
@ -1163,7 +1169,7 @@ rdp_incoming_peer(freerdp_listener *instance, freerdp_peer *client)
{
struct rdp_backend *b = (struct rdp_backend *)instance->param4;
if (rdp_peer_init(client, b) < 0) {
weston_log("error when treating incoming peer");
weston_log("error when treating incoming peer\n");
FREERDP_CB_RETURN(FALSE);
}

Loading…
Cancel
Save