From 0b97e7a4f23f7add763ac6e0fc945c9a342a7d32 Mon Sep 17 00:00:00 2001 From: malosek Date: Wed, 27 Jan 2010 11:30:22 +0100 Subject: libpgm updated to 2.6.21rc6 --- src/pgm_socket.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/pgm_socket.cpp') diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp index 11084ff..4d713e3 100644 --- a/src/pgm_socket.cpp +++ b/src/pgm_socket.cpp @@ -27,8 +27,6 @@ #ifdef ZMQ_HAVE_LINUX #include -// Has to be defined befiore including pgm/pgm.h -#define CONFIG_HAVE_POLL #endif #include @@ -88,10 +86,25 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_) // Note that if you want to use gettimeofday and sleep for openPGM timing, // set environment variables PGM_TIMER to "GTOD" // and PGM_SLEEP to "USLEEP". - int rc = pgm_init (); - if (rc != 0) { - errno = EINVAL; - return -1; + int rc = pgm_init (&pgm_error); + if (rc != TRUE) { + + if (pgm_error->domain == PGM_IF_ERROR && ( + pgm_error->code == PGM_IF_ERROR_INVAL || + pgm_error->code == PGM_IF_ERROR_XDEV || + pgm_error->code == PGM_IF_ERROR_NODEV || + pgm_error->code == PGM_IF_ERROR_NOTUNIQ || + pgm_error->code == PGM_IF_ERROR_ADDRFAMILY || + pgm_error->code == PGM_IF_ERROR_FAMILY || + pgm_error->code == PGM_IF_ERROR_NODATA || + pgm_error->code == PGM_IF_ERROR_NONAME || + pgm_error->code == PGM_IF_ERROR_SERVICE)) { + errno = EINVAL; + g_error_free (pgm_error); + return -1; + } + + zmq_assert (false); } // PGM transport GSI. -- cgit v1.2.3