Browse Source

Assert that accessCheck isn't called too early

These checks depend on accessRights being set up, this has only happened
if we have done the QUERYING steps.
tags/v1.12.90
Samuel Mannehed 2 years ago
parent
commit
3223f20d59
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      common/rfb/SConnection.cxx

+ 3
- 0
common/rfb/SConnection.cxx View File

@@ -23,6 +23,7 @@

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <rfb/Exception.h>
#include <rfb/Security.h>
#include <rfb/clipboardTypes.h>
@@ -346,6 +347,8 @@ void SConnection::setAccessRights(AccessRights ar)

bool SConnection::accessCheck(AccessRights ar) const
{
assert(state_ >= RFBSTATE_QUERYING);

return (accessRights & ar) == ar;
}


Loading…
Cancel
Save