summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Cpg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/cluster/Cpg.cpp')
-rw-r--r--cpp/src/qpid/cluster/Cpg.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/qpid/cluster/Cpg.cpp b/cpp/src/qpid/cluster/Cpg.cpp
index 87e483141e..506703d105 100644
--- a/cpp/src/qpid/cluster/Cpg.cpp
+++ b/cpp/src/qpid/cluster/Cpg.cpp
@@ -25,6 +25,8 @@
#include <limits>
#include <iterator>
+#include <unistd.h>
+
namespace qpid {
namespace cluster {
@@ -174,6 +176,11 @@ ostream& operator <<(ostream& out, const cpg_name& name) {
return out << string(name.value, name.length);
}
+
+Cpg::Id Cpg::Id::self(Cpg& cpg) {
+ return Id(cpg.getLocalNoideId(), getpid());
+}
+
}} // namespace qpid::cluster