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:
Ian Barber
2012-09-04 23:24:48 +01:00
parent d0687876c0
commit d7331b7b1f
4 changed files with 6 additions and 6 deletions

View File

@@ -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);