summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/LinkLocal/LinkLocalRoster.cpp')
-rw-r--r--Swiften/LinkLocal/LinkLocalRoster.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Swiften/LinkLocal/LinkLocalRoster.cpp b/Swiften/LinkLocal/LinkLocalRoster.cpp
index 6809377..ca608a3 100644
--- a/Swiften/LinkLocal/LinkLocalRoster.cpp
+++ b/Swiften/LinkLocal/LinkLocalRoster.cpp
@@ -128,4 +128,13 @@ String LinkLocalRoster::getHostname(const JID& j) const {
return "";
}
+int LinkLocalRoster::getPort(const JID& j) const {
+ for(ServiceMap::const_iterator i = services.begin(); i != services.end(); ++i) {
+ if (getJIDForService(i->first) == j) {
+ return i->second.port;
+ }
+ }
+ return 0;
+}
+
}