Bläddra i källkod

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 år sedan
förälder
incheckning
3223f20d59
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3
    0
      common/rfb/SConnection.cxx

+ 3
- 0
common/rfb/SConnection.cxx Visa fil

@@ -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;
}


Laddar…
Avbryt
Spara