summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-02-24 17:27:31 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-02-24 17:27:31 +0100
commited8fe68383ca94ca33a9919bc2ed5b5a5d62cab0 (patch)
treee0acfd14882c60ce59f81f499422f4a578deefe0
parentbe51cfa419bb6c75eb24d241769a7c5543c432a7 (diff)
handle invalid PGM connection string decently
-rw-r--r--src/pgm_socket.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index 462a3a9..f9781a5 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -316,6 +316,12 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
errno = EINVAL;
return -1;
}
+ if (pgm_error->domain == PGM_TRANSPORT_ERROR && (
+ pgm_error->code == PGM_TRANSPORT_ERROR_FAILED)) {
+ g_error_free (pgm_error);
+ errno = EINVAL;
+ return -1;
+ }
zmq_assert (false);
}