diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c index 4ef0dd1..9982c25 100644 --- a/src/compositor-rdp.c +++ b/src/compositor-rdp.c @@ -1201,6 +1209,9 @@ rdp_backend_create(struct weston_compositor *compositor, if(!config->env_socket) { b->listener = freerdp_listener_new(); + if (b->listener == NULL) + goto err_listener; + b->listener->PeerAccepted = rdp_incoming_peer; b->listener->param4 = b; if (!b->listener->Open(b->listener, config->bind_address, config->port)) { @@ -1214,7 +1225,7 @@ rdp_backend_create(struct weston_compositor *compositor, /* get the socket from RDP_FD var */ fd_str = getenv("RDP_FD"); if (!fd_str) { - weston_log("RDP_FD env variable not set"); + weston_log("RDP_FD env variable not set\n"); goto err_output; } diff --git a/src/main.c b/src/main.c index a2ed2b4..0017ab5 100644 --- a/src/main.c +++ b/src/main.c @@ -319,7 +319,7 @@ usage(int error_code) "Options for rdp-backend.so:\n\n" " --width=WIDTH\t\tWidth of desktop\n" " --height=HEIGHT\tHeight of desktop\n" - " --env-socket=SOCKET\tUse that socket as peer connection\n" + " --env-socket\t\tUse socket defined in RDP_FD env variable as peer connection\n" " --address=ADDR\tThe address to bind\n" " --port=PORT\t\tThe port to listen on\n" " --no-clients-resize\tThe RDP peers will be forced to the size of the desktop\n"