mirror of https://github.com/FreeRDP/FreeRDP
wfreerdp-server: more error handling improvements
This commit is contained in:
parent
034000b0f1
commit
f83aa371aa
|
@ -225,7 +225,12 @@ void wf_info_peer_register(wfInfo* wfi, wfPeerContext* context)
|
|||
if (wfi->peerCount == 0)
|
||||
wf_dxgi_init(wfi);
|
||||
#else
|
||||
wf_mirror_driver_activate(wfi);
|
||||
if (wf_mirror_driver_activate(wfi) == FALSE)
|
||||
{
|
||||
context->socketClose = TRUE;
|
||||
wf_info_unlock(wfi);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
//look trhough the array of peers until an empty slot
|
||||
for(i=0; i<WF_INFO_MAXPEERS; ++i)
|
||||
|
|
|
@ -292,7 +292,7 @@ BOOL wf_mirror_driver_cleanup(wfInfo* wfi)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void wf_mirror_driver_activate(wfInfo* wfi)
|
||||
BOOL wf_mirror_driver_activate(wfInfo* wfi)
|
||||
{
|
||||
if (!wfi->mirrorDriverActive)
|
||||
{
|
||||
|
@ -301,28 +301,30 @@ void wf_mirror_driver_activate(wfInfo* wfi)
|
|||
if (wf_mirror_driver_find_display_device(wfi) == FALSE)
|
||||
{
|
||||
printf("Could not find dfmirage mirror driver! Is it installed?\n");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (wf_mirror_driver_display_device_attach(wfi, 1) == FALSE)
|
||||
{
|
||||
printf("Could not attach display device!\n");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (wf_mirror_driver_update(wfi, FALSE) == FALSE)
|
||||
{
|
||||
printf("could not update system with new display settings!\n");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (wf_mirror_driver_map_memory(wfi) == FALSE)
|
||||
{
|
||||
printf("Unable to map memory for mirror driver!\n");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
wfi->mirrorDriverActive = TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wf_mirror_driver_deactivate(wfInfo* wfi)
|
||||
|
|
|
@ -206,7 +206,7 @@ BOOL wf_mirror_driver_update(wfInfo* wfi, int unload);
|
|||
BOOL wf_mirror_driver_map_memory(wfInfo* wfi);
|
||||
BOOL wf_mirror_driver_cleanup(wfInfo* wfi);
|
||||
|
||||
void wf_mirror_driver_activate(wfInfo* wfi);
|
||||
BOOL wf_mirror_driver_activate(wfInfo* wfi);
|
||||
void wf_mirror_driver_deactivate(wfInfo* wfi);
|
||||
|
||||
#endif /* WF_MIRAGE_H */
|
||||
|
|
Loading…
Reference in New Issue