From 43770dae362d25f328a964e59e5740e3ca0cb987 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 4 May 2013 04:18:30 +0200 Subject: [PATCH] qrexec: handle vchan connect errors --- qrexec/qrexec-daemon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qrexec/qrexec-daemon.c b/qrexec/qrexec-daemon.c index 9605136..95d5aa6 100644 --- a/qrexec/qrexec-daemon.c +++ b/qrexec/qrexec-daemon.c @@ -205,6 +205,10 @@ void init(int xid) } vchan = libvchan_client_init(xid, REXEC_PORT); + if (!vchan) { + perror("cannot connect to qrexec agent"); + exit(1); + } /* wait for connection */ while (!libvchan_is_open(vchan)) libvchan_wait(vchan);