aboutsummaryrefslogtreecommitdiffstats
path: root/win/vncconfig
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-08-10 14:03:16 +0200
committerPierre Ossman <ossman@cendio.se>2015-08-10 14:03:16 +0200
commitcd87317f6debfe4a6157e3601f86e3f0b3526683 (patch)
treefdd96c41ba5a5bdb4bd1d36aac5fc499647ef121 /win/vncconfig
parent14e214f10b9de6869695b526da42681b31af416c (diff)
downloadtigervnc-cd87317f6debfe4a6157e3601f86e3f0b3526683.tar.gz
tigervnc-cd87317f6debfe4a6157e3601f86e3f0b3526683.zip
Show error dialog when ACL pattern isn't accepted
Diffstat (limited to 'win/vncconfig')
-rw-r--r--win/vncconfig/Connections.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/win/vncconfig/Connections.h b/win/vncconfig/Connections.h
index 6176f3dc..3d3c06cb 100644
--- a/win/vncconfig/Connections.h
+++ b/win/vncconfig/Connections.h
@@ -73,8 +73,13 @@ namespace rfb {
newPat.buf[1] = 0;
_tcscat(newPat.buf, host.buf);
- network::TcpFilter::Pattern pat(network::TcpFilter::parsePattern(CStr(newPat.buf)));
- pattern.replaceBuf(TCharArray(network::TcpFilter::patternToStr(pat)).takeBuf());
+ try {
+ network::TcpFilter::Pattern pat(network::TcpFilter::parsePattern(CStr(newPat.buf)));
+ pattern.replaceBuf(TCharArray(network::TcpFilter::patternToStr(pat)).takeBuf());
+ } catch(rdr::Exception e) {
+ MsgBox(NULL, TStr(e.str()), MB_ICONEXCLAMATION | MB_OK);
+ return false;
+ }
return true;
}
const TCHAR* getPattern() {return pattern.buf;}