summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-04-30 06:47:36 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-04-30 06:47:36 +0200
commitfe2e772dd5d36024a91ce3abb86996599960e078 (patch)
tree12d76318ab3872235701e45eee33008c86d069aa /src
parent96213d5735829bfbebfb544a584a34bb8c0081fa (diff)
pgm_socket uses binary version of UUID
pgm_socket used textural form of UUID to generate GSIs. The recent patch that removed support for textual UUIDs broke the functionality. This patch fixes the problem. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src')
-rw-r--r--src/pgm_socket.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index d84ecb0..8a60ec2 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -261,10 +261,10 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
goto err_abort;
} else {
- // Generate random gsi.
- std::string gsi_base = uuid_t ().to_string ();
- if (!pgm_gsi_create_from_string (&addr.sa_addr.gsi,
- gsi_base.c_str (), -1))
+ // Generate GSI from UUID.
+ unsigned char buf [16];
+ generate_uuid (buf);
+ if (!pgm_gsi_create_from_data (&addr.sa_addr.gsi, buf, 16))
goto err_abort;
}