diff options
author | runge <runge> | 2006-06-03 04:01:29 +0000 |
---|---|---|
committer | runge <runge> | 2006-06-03 04:01:29 +0000 |
commit | 8417618289bd95663789bb67d841800f166c57a0 (patch) | |
tree | c8b289f03dcd1cf3f73b927a23842e05c088fe73 | |
parent | 6c8e6e0678ed67967e5db20378c3f44d53b14bbb (diff) | |
download | libtdevnc-8417618289bd95663789bb67d841800f166c57a0.tar.gz libtdevnc-8417618289bd95663789bb67d841800f166c57a0.zip |
move all types into handler loop.
-rwxr-xr-x | libvncserver/auth.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libvncserver/auth.c b/libvncserver/auth.c index 2a8fcb4..a1f75a0 100755 --- a/libvncserver/auth.c +++ b/libvncserver/auth.c @@ -277,19 +277,18 @@ rfbProcessClientSecurityType(rfbClientPtr cl) return; } - if(chosenType == rfbSecTypeNone) { - cl->state = RFB_INITIALISATION; - return; - } - - /* Make sure it was present in the list sent by the server. */ - for (handler = securityHandlers; handler; - handler = handler->next) + for (handler = securityHandlers; handler; handler = handler->next) { if (chosenType == handler->type) { - handler->handler(cl); - return; + if (chosenType == rfbSecTypeNone) { + cl->state = RFB_INITIALISATION; + return; + } else { + handler->handler(cl); + return; + } } + } rfbLog("rfbProcessClientSecurityType: wrong security type requested\n"); rfbCloseClient(cl); |