0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 16:45:51 +08:00

handle invalid PGM connection string decently

This commit is contained in:
Martin Sustrik 2010-02-24 17:27:31 +01:00
parent be51cfa419
commit ed8fe68383

View File

@ -316,6 +316,12 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
errno = EINVAL; errno = EINVAL;
return -1; 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); zmq_assert (false);
} }