diff options
Diffstat (limited to 'common/rfb/CSecurityPlain.cxx')
-rw-r--r-- | common/rfb/CSecurityPlain.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/common/rfb/CSecurityPlain.cxx b/common/rfb/CSecurityPlain.cxx index 464dfcb5..7b75ef86 100644 --- a/common/rfb/CSecurityPlain.cxx +++ b/common/rfb/CSecurityPlain.cxx @@ -24,7 +24,6 @@ #include <rfb/CConnection.h> #include <rfb/CSecurityPlain.h> #include <rfb/UserPasswdGetter.h> -#include <rfb/util.h> #include <rdr/OutStream.h> @@ -34,16 +33,16 @@ bool CSecurityPlain::processMsg() { rdr::OutStream* os = cc->getOutStream(); - CharArray username; - CharArray password; + std::string username; + std::string password; - (CSecurity::upg)->getUserPasswd(cc->isSecure(), &username.buf, &password.buf); + (CSecurity::upg)->getUserPasswd(cc->isSecure(), &username, &password); // Return the response to the server - os->writeU32(strlen(username.buf)); - os->writeU32(strlen(password.buf)); - os->writeBytes(username.buf,strlen(username.buf)); - os->writeBytes(password.buf,strlen(password.buf)); + os->writeU32(username.size()); + os->writeU32(password.size()); + os->writeBytes(username.data(), username.size()); + os->writeBytes(password.data(), password.size()); os->flush(); return true; } |