mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-27 11:54:44 +08:00
shadow server: add more error messages
This commit is contained in:
parent
af7febf5da
commit
d98f11705e
@ -36,6 +36,7 @@ static BOOL g_MessagePump = FALSE;
|
||||
#endif
|
||||
|
||||
#include <freerdp/server/shadow.h>
|
||||
#define TAG SERVER_TAG("shadow")
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
@ -52,6 +53,7 @@ int main(int argc, char** argv)
|
||||
if (!server)
|
||||
{
|
||||
status = -1;
|
||||
WLog_ERR(TAG, "Server new failed");
|
||||
goto fail_server_new;
|
||||
}
|
||||
|
||||
@ -70,14 +72,21 @@ int main(int argc, char** argv)
|
||||
if ((status = shadow_server_parse_command_line(server, argc, argv)) < 0)
|
||||
{
|
||||
shadow_server_command_line_status_print(server, argc, argv, status);
|
||||
WLog_ERR(TAG, "Problem parsing the command line.");
|
||||
goto fail_parse_command_line;
|
||||
}
|
||||
|
||||
if ((status = shadow_server_init(server)) < 0)
|
||||
{
|
||||
WLog_ERR(TAG, "Server initialization failed.");
|
||||
goto fail_server_init;
|
||||
}
|
||||
|
||||
if ((status = shadow_server_start(server)) < 0)
|
||||
{
|
||||
WLog_ERR(TAG, "Failed to start server.");
|
||||
goto fail_server_start;
|
||||
}
|
||||
|
||||
if (g_MessagePump)
|
||||
{
|
||||
|
@ -453,12 +453,18 @@ int shadow_server_start(rdpShadowServer* server)
|
||||
server->screen = shadow_screen_new(server);
|
||||
|
||||
if (!server->screen)
|
||||
{
|
||||
WLog_ERR(TAG, "screen_new failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
server->capture = shadow_capture_new(server);
|
||||
|
||||
if (!server->capture)
|
||||
{
|
||||
WLog_ERR(TAG, "capture_new failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!server->ipcSocket)
|
||||
status = server->listener->Open(server->listener, NULL, (UINT16) server->port);
|
||||
@ -466,7 +472,10 @@ int shadow_server_start(rdpShadowServer* server)
|
||||
status = server->listener->OpenLocal(server->listener, server->ipcSocket);
|
||||
|
||||
if (!status)
|
||||
{
|
||||
WLog_ERR(TAG, "Problem creating listener. (Port already used or insufficient permissions?)");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(server->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)
|
||||
shadow_server_thread, (void*) server, 0, NULL)))
|
||||
|
Loading…
Reference in New Issue
Block a user