diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-08-10 14:03:16 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-08-10 14:03:16 +0200 |
commit | cd87317f6debfe4a6157e3601f86e3f0b3526683 (patch) | |
tree | fdd96c41ba5a5bdb4bd1d36aac5fc499647ef121 /win/vncconfig | |
parent | 14e214f10b9de6869695b526da42681b31af416c (diff) | |
download | tigervnc-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.h | 9 |
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;} |