From 94d88c1799d6446c132a2ac7198601487d792099 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 23 Apr 2010 13:59:52 +0000 Subject: [Development] Define security types as rdr::U8 values. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4034 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/rfb/Security.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'common/rfb/Security.cxx') diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx index 830d8444..67acf5c9 100644 --- a/common/rfb/Security.cxx +++ b/common/rfb/Security.cxx @@ -22,7 +22,7 @@ #include #include -int rfb::secTypeNum(const char* name) +rdr::U8 rfb::secTypeNum(const char* name) { if (strcasecmp(name, "None") == 0) return secTypeNone; if (strcasecmp(name, "VncAuth") == 0) return secTypeVncAuth; @@ -34,7 +34,7 @@ int rfb::secTypeNum(const char* name) return secTypeInvalid; } -const char* rfb::secTypeName(int num) +const char* rfb::secTypeName(rdr::U8 num) { switch (num) { case secTypeNone: return "None"; @@ -48,7 +48,7 @@ const char* rfb::secTypeName(int num) } } -bool rfb::secTypeEncrypts(int num) +bool rfb::secTypeEncrypts(rdr::U8 num) { switch (num) { case secTypeRA2: @@ -59,13 +59,13 @@ bool rfb::secTypeEncrypts(int num) } } -std::list rfb::parseSecTypes(const char* types_) +std::list rfb::parseSecTypes(const char* types_) { - std::list result; + std::list result; CharArray types(strDup(types_)), type; while (types.buf) { strSplit(types.buf, ',', &type.buf, &types.buf); - int typeNum = secTypeNum(type.buf); + rdr::U8 typeNum = secTypeNum(type.buf); if (typeNum != secTypeInvalid) result.push_back(typeNum); } -- cgit v1.2.3