diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-07-12 18:43:33 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-07-12 18:43:33 (GMT) |
commit | 08536b4ed31c30a25a343c3c2619676e67a0c692 (patch) | |
tree | 744066e3373bc1e27e9b4d18fd0c1b25d4da5878 /Swiften/JID/JID.h | |
parent | d181db064ee10c23f0f126f2feb0329ee2236d4c (diff) | |
download | swift-contrib-08536b4ed31c30a25a343c3c2619676e67a0c692.zip swift-contrib-08536b4ed31c30a25a343c3c2619676e67a0c692.tar.bz2 |
Fixed bug with illegal resource in JID resulting in empty resource.
Diffstat (limited to 'Swiften/JID/JID.h')
-rw-r--r-- | Swiften/JID/JID.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/JID/JID.h b/Swiften/JID/JID.h index 63e063d..1a7dbe3 100644 --- a/Swiften/JID/JID.h +++ b/Swiften/JID/JID.h @@ -16,19 +16,19 @@ namespace Swift { WithResource, WithoutResource }; JID(const std::string& = std::string()); JID(const char*); JID(const std::string& node, const std::string& domain); JID(const std::string& node, const std::string& domain, const std::string& resource); bool isValid() const { - return !domain_.empty(); /* FIXME */ + return valid_; } const std::string& getNode() const { return node_; } const std::string& getDomain() const { return domain_; } const std::string& getResource() const { @@ -73,15 +73,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_; }; } |