summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/SASL/PLAINMessage.cpp')
-rw-r--r--Swiften/SASL/PLAINMessage.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/SASL/PLAINMessage.cpp b/Swiften/SASL/PLAINMessage.cpp
index 3728b39..036887c 100644
--- a/Swiften/SASL/PLAINMessage.cpp
+++ b/Swiften/SASL/PLAINMessage.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "Swiften/SASL/PLAINMessage.h"
+#include <Swiften/SASL/PLAINMessage.h>
namespace Swift {
@@ -13,24 +13,24 @@ PLAINMessage::PLAINMessage(const std::string& authcid, const std::string& passwo
PLAINMessage::PLAINMessage(const ByteArray& value) {
size_t i = 0;
- while (i < value.getSize() && value[i] != '\0') {
+ while (i < value.size() && value[i] != '\0') {
authzid += value[i];
++i;
}
- if (i == value.getSize()) {
+ if (i == value.size()) {
return;
}
++i;
- while (i < value.getSize() && value[i] != '\0') {
+ while (i < value.size() && value[i] != '\0') {
authcid += value[i];
++i;
}
- if (i == value.getSize()) {
+ if (i == value.size()) {
authcid = "";
return;
}
++i;
- while (i < value.getSize()) {
+ while (i < value.size()) {
password += value[i];
++i;
}
@@ -38,7 +38,7 @@ PLAINMessage::PLAINMessage(const ByteArray& value) {
ByteArray PLAINMessage::getValue() const {
std::string s = authzid + '\0' + authcid + '\0' + password;
- return ByteArray(s.c_str(), s.size());
+ return createByteArray(s);
}
}