Procházet zdrojové kódy

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 před 2 roky
rodič
revize
3223f20d59
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3
    0
      common/rfb/SConnection.cxx

+ 3
- 0
common/rfb/SConnection.cxx Zobrazit soubor

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


Načítá se…
Zrušit
Uložit