summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-07-12 18:47:03 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-07-12 18:47:03 (GMT)
commit63b311c1bb60469eb5e2ccd2107739e11b189a15 (patch)
tree870057043f88e91b71b961a821a4dace859fc839 /Swiften/JID/JID.h
parentc6819a5fd632d03cfe72a58922054765c7383aa6 (diff)
parent08536b4ed31c30a25a343c3c2619676e67a0c692 (diff)
downloadswift-contrib-63b311c1bb60469eb5e2ccd2107739e11b189a15.zip
swift-contrib-63b311c1bb60469eb5e2ccd2107739e11b189a15.tar.bz2
Merge branch 'swift-1.x'
* swift-1.x: Fixed bug with illegal resource in JID resulting in empty resource. Updated the german translation Conflicts: Swiften/IDN/StringPrep.cpp Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp
Diffstat (limited to 'Swiften/JID/JID.h')
-rw-r--r--Swiften/JID/JID.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/JID/JID.h b/Swiften/JID/JID.h
index 756db98..a4461ba 100644
--- a/Swiften/JID/JID.h
+++ b/Swiften/JID/JID.h
@@ -66,19 +66,19 @@ namespace Swift {
* @param domain JID domain part.
* @param resource JID resource part.
*/
JID(const std::string& node, const std::string& domain, const std::string& resource);
/**
* @return Is a correctly-formatted JID.
*/
bool isValid() const {
- return !domain_.empty(); /* FIXME */
+ return valid_;
}
/**
* e.g. JID("node@domain").getNode() == "node"
* @return could be empty.
*/
const std::string& getNode() const {
return node_;
}
@@ -156,15 +156,16 @@ namespace Swift {
friend bool operator!=(const Swift::JID& a, const Swift::JID& b) {
return a.compare(b, Swift::JID::WithResource) != 0;
}
private:
void nameprepAndSetComponents(const std::string& node, const std::string& domain, const std::string& resource);
void initializeFromString(const std::string&);
private:
+ bool valid_;
std::string node_;
std::string domain_;
bool hasResource_;
std::string resource_;
};
}