mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-06 21:56:25 +01:00
Fixing PGM issues
Hopefully fixed LIBZMQ-427 - there was a slight typo in the init_address refactor. The encoder refactoring had also broken pgm_sender and receiver, but just required updating to use the new functions.
This commit is contained in:
@@ -65,7 +65,7 @@ zmq::pgm_socket_t::pgm_socket_t (bool receiver_, const options_t &options_) :
|
||||
// link-local;224.250.0.1,224.250.0.2;224.250.0.3:8000
|
||||
// ;[fe80::1%en0]:7500
|
||||
int zmq::pgm_socket_t::init_address (const char *network_,
|
||||
struct pgm_addrinfo_t **addr, uint16_t *port_number)
|
||||
struct pgm_addrinfo_t **res, uint16_t *port_number)
|
||||
{
|
||||
// Parse port number, start from end for IPv6
|
||||
const char *port_delim = strrchr (network_, ':');
|
||||
@@ -85,11 +85,11 @@ int zmq::pgm_socket_t::init_address (const char *network_,
|
||||
memcpy (network, network_, port_delim - network_);
|
||||
|
||||
pgm_error_t *pgm_error = NULL;
|
||||
struct pgm_addrinfo_t hints, *res = NULL;
|
||||
struct pgm_addrinfo_t hints;
|
||||
|
||||
memset (&hints, 0, sizeof (hints));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
if (!pgm_getaddrinfo (network, NULL, &res, &pgm_error)) {
|
||||
if (!pgm_getaddrinfo (network, NULL, res, &pgm_error)) {
|
||||
|
||||
// Invalid parameters don't set pgm_error_t.
|
||||
zmq_assert (pgm_error != NULL);
|
||||
|
||||
Reference in New Issue
Block a user