From 73b765e4b497f6a505cbf88c524085fa0e58e59c Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 13 Dec 2009 09:11:08 +0100 Subject: PGM transport fixed --- src/pgm_sender.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/pgm_sender.cpp') diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp index 0a958c5..964e00b 100644 --- a/src/pgm_sender.cpp +++ b/src/pgm_sender.cpp @@ -49,6 +49,7 @@ zmq::pgm_sender_t::pgm_sender_t (io_thread_t *parent_, const options_t &options_, const char *session_name_) : io_object_t (parent_), + encoder (0), pgm_socket (false, options_), options (options_), session_name (session_name_), @@ -162,8 +163,9 @@ void zmq::pgm_sender_t::out_event () // First two bytes /sizeof (uint16_t)/ are used to store message // offset in following steps. - write_size = encoder.read (out_buffer + sizeof (uint16_t), - out_buffer_size - sizeof (uint16_t), &first_message_offset); + unsigned char *bf = out_buffer + sizeof (uint16_t); + write_size = out_buffer_size - sizeof (uint16_t); + encoder.get_data (&bf, &write_size, &first_message_offset); write_pos = 0; // If there are no data to write stop polling for output. -- cgit v1.2.3