From 1b706ac02858aee4c960331dc7100f8c14312848 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Thu, 27 Oct 2011 11:48:58 +0200 Subject: [PATCH 01/20] Enable exceptions raising on assert on Win32 This patch changes the Win32 version to call RaiseException instead of abort (which eventually calls TerminateProcess). This allows crash dumps to be sent correctly instead of the process disappearing. Signed-off-by: Paul Betts --- src/err.cpp | 13 +++++++++++++ src/err.hpp | 26 ++++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/err.cpp b/src/err.cpp index f374de96..ff81e033 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -62,6 +62,19 @@ const char *zmq::errno_to_string (int errno_) } } +void zmq::zmq_abort(const char *errmsg_) +{ +#if defined ZMQ_HAVE_WINDOWS + + // Raise STATUS_FATAL_APP_EXIT. + ULONG_PTR extra_info [1]; + extra_info [0] = (ULONG_PTR) errmsg_; + RaiseException (0x40000015, EXCEPTION_NONCONTINUABLE, 1, extra_info); +#else + abort (); +#endif +} + #ifdef ZMQ_HAVE_WINDOWS const char *zmq::wsa_error() diff --git a/src/err.hpp b/src/err.hpp index 9558a102..7c7a9d80 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -42,6 +42,7 @@ namespace zmq { const char *errno_to_string (int errno_); + void zmq_abort (const char *errmsg_); } #ifdef ZMQ_HAVE_WINDOWS @@ -51,7 +52,7 @@ namespace zmq const char *wsa_error (); const char *wsa_error_no (int no_); void win_error (char *buffer_, size_t buffer_size_); - void wsa_error_to_errno (); + void wsa_error_to_errno (); } // Provides convenient way to check WSA-style errors on Windows. @@ -62,7 +63,7 @@ namespace zmq if (errstr != NULL) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ - abort ();\ + zmq::zmq_abort (errstr);\ }\ }\ } while (false) @@ -74,7 +75,7 @@ namespace zmq if (errstr != NULL) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ - abort ();\ + zmq::zmq_abort (errstr);\ }\ } while (false) @@ -86,7 +87,7 @@ namespace zmq zmq::win_error (errstr, 256);\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ - abort ();\ + zmq::zmq_abort (errstr);\ }\ } while (false) @@ -100,7 +101,7 @@ namespace zmq if (unlikely (!(x))) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", #x, \ __FILE__, __LINE__);\ - abort ();\ + zmq::zmq_abort (#x);\ }\ } while (false) @@ -108,9 +109,9 @@ namespace zmq #define errno_assert(x) \ do {\ if (unlikely (!(x))) {\ - perror (NULL);\ - fprintf (stderr, "%s (%s:%d)\n", #x, __FILE__, __LINE__);\ - abort ();\ + const char *errstr = strerror (errno);\ + fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ + zmq::zmq_abort (errstr);\ }\ } while (false) @@ -118,8 +119,9 @@ namespace zmq #define posix_assert(x) \ do {\ if (unlikely (x)) {\ - fprintf (stderr, "%s (%s:%d)\n", strerror (x), __FILE__, __LINE__);\ - abort ();\ + const char *errstr = strerror (x);\ + fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ + zmq::zmq_abort (errstr);\ }\ } while (false) @@ -129,7 +131,7 @@ namespace zmq if (unlikely (x)) {\ const char *errstr = gai_strerror (x);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ - abort ();\ + zmq::zmq_abort (errstr);\ }\ } while (false) @@ -139,7 +141,7 @@ namespace zmq if (unlikely (!x)) {\ fprintf (stderr, "FATAL ERROR: OUT OF MEMORY (%s:%d)\n",\ __FILE__, __LINE__);\ - abort ();\ + zmq::zmq_abort ("FATAL ERROR: OUT OF MEMORY");\ }\ } while (false) From 68ab5f87edd2436757ab92b22238a5a4114d7b0d Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 27 Oct 2011 11:51:23 +0200 Subject: [PATCH 02/20] Paul Betts added to the AUTHORS file Signed-off-by: Martin Sustrik --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 589a160e..52313ac1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -50,6 +50,7 @@ Mikko Koppanen Min Ragan-Kelley Neale Ferguson Nir Soffer +Paul Betts Paul Colomiets Pavel Gushcha Pavol Malosek From 9e000c8f26c99656dd967a8d15997b879af5817b Mon Sep 17 00:00:00 2001 From: Ben Gray Date: Thu, 27 Oct 2011 13:59:54 +0200 Subject: [PATCH 03/20] Patch for issue LIBZMQ-275. Dealing with VSM in distribution when pipes fail to write. Signed-off-by: Ben Gray --- src/dist.cpp | 10 ++++++++++ src/msg.cpp | 6 ++++++ src/msg.hpp | 1 + 3 files changed, 17 insertions(+) diff --git a/src/dist.cpp b/src/dist.cpp index 795e13e7..b4fae6f7 100644 --- a/src/dist.cpp +++ b/src/dist.cpp @@ -137,6 +137,16 @@ void zmq::dist_t::distribute (msg_t *msg_, int flags_) return; } + if (msg_->is_vsm ()) { + for (pipes_t::size_type i = 0; i < matching; ++i) + write (pipes [i], msg_); + int rc = msg_->close(); + errno_assert (rc == 0); + rc = msg_->init (); + errno_assert (rc == 0); + return; + } + // Add matching-1 references to the message. We already hold one reference, // that's why -1. msg_->add_refs ((int) matching - 1); diff --git a/src/msg.cpp b/src/msg.cpp index e51ab670..fba7ec9b 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -237,6 +237,11 @@ bool zmq::msg_t::is_delimiter () return u.base.type == type_delimiter; } +bool zmq::msg_t::is_vsm () +{ + return u.base.type == type_vsm; +} + void zmq::msg_t::add_refs (int refs_) { zmq_assert (refs_ >= 0); @@ -279,3 +284,4 @@ bool zmq::msg_t::rm_refs (int refs_) return true; } + diff --git a/src/msg.hpp b/src/msg.hpp index 514f95b4..6b4e216f 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -68,6 +68,7 @@ namespace zmq void set_flags (unsigned char flags_); void reset_flags (unsigned char flags_); bool is_delimiter (); + bool is_vsm (); // After calling this function you can copy the message in POD-style // refs_ times. No need to call copy. From 9b3e61a178af5c5e373c701a11697051c4c9a50a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 27 Oct 2011 14:02:57 +0200 Subject: [PATCH 04/20] Ben Gray added to the AUTHORS file Signed-off-by: Martin Sustrik --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 52313ac1..37c47a09 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,6 +5,7 @@ Alexej Lotz Andrew Thompson Asko Kauppi Barak Amar +Ben Gray Bernd Prager Bernd Melchers Bob Beaty From 52bab42212c263a51b219ae8714c481bc948cb4e Mon Sep 17 00:00:00 2001 From: Bernd Prager Date: Thu, 27 Oct 2011 17:11:28 +0200 Subject: [PATCH 05/20] Missing bracket added Signed-off: Martin Sustrik --- src/zmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zmq.cpp b/src/zmq.cpp index 0f54fabd..e2bc5090 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -603,7 +603,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) } #else int rc = select (maxfd + 1, &inset, &outset, &errset, ptimeout); - if (unlikely (rc == -1) { + if (unlikely (rc == -1)) { if (errno == EINTR || errno == EBADF) return -1; errno_assert (false); From 09574a6104ce824c43fe8261d31451ccb337d11b Mon Sep 17 00:00:00 2001 From: Perry Kundert Date: Sat, 29 Oct 2011 14:47:53 +0200 Subject: [PATCH 06/20] Corrected discarding of remainder of message when request ID invalid When zmq::req_t::xrecv detects that a response has no request ID label, or the ID is the wrong size, it would return an EAGAIN, but would not discard the remainder of the message. This could allow the remainder of the message to incorrectly "leak" into a future response, if it is crafted to look like a reply with a valid response ID. Discard all remaining message blocks, if the ID is invalid in any way. --- src/req.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/req.cpp b/src/req.cpp index 04a19fbc..0832f60f 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -92,14 +92,20 @@ int zmq::req_t::xrecv (msg_t *msg_, int flags_) // TODO: This should also close the connection with the peer! if (unlikely (!(msg_->flags () & msg_t::label) || msg_->size () != 4)) { + while (true) { + int rc = xreq_t::xrecv (msg_, flags_); + errno_assert (rc == 0); + if (!(msg_->flags () & (msg_t::label | msg_t::more))) + break; + } + msg_->close (); + msg_->init (); errno = EAGAIN; return -1; } unsigned char *data = (unsigned char*) msg_->data (); if (unlikely (get_uint32 (data) != request_id)) { - - // The request ID does not match. Drop the entire message. while (true) { int rc = xreq_t::xrecv (msg_, flags_); errno_assert (rc == 0); From 541b83bc02784c721efa3d9dde8f8a191c3c3b7b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 29 Oct 2011 14:49:08 +0200 Subject: [PATCH 07/20] Perry Kundert added to the AUTHORS file Signed-off-by: Martin Sustrik --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 37c47a09..5ebf390a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -55,6 +55,7 @@ Paul Betts Paul Colomiets Pavel Gushcha Pavol Malosek +Perry Kundert Peter Bourgon Pieter Hintjens Piotr Trojanek From dee8b2360ac0084165401dd61fc485226402124d Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 15:44:42 +0100 Subject: [PATCH 08/20] New style ROUTER socket removed. Signed-off-by: Martin Sustrik --- include/zmq.h | 1 - src/Makefile.am | 2 - src/router.cpp | 285 ------------------------------------------- src/router.hpp | 123 ------------------- src/session_base.cpp | 5 - src/socket_base.cpp | 4 - 6 files changed, 420 deletions(-) delete mode 100755 src/router.cpp delete mode 100755 src/router.hpp diff --git a/include/zmq.h b/include/zmq.h index e236b2a3..a262d018 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -162,7 +162,6 @@ ZMQ_EXPORT int zmq_term (void *context); #define ZMQ_PUSH 8 #define ZMQ_XPUB 9 #define ZMQ_XSUB 10 -#define ZMQ_ROUTER 13 /* Socket options. */ #define ZMQ_AFFINITY 4 diff --git a/src/Makefile.am b/src/Makefile.am index 3b7dec6e..137ba739 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -55,7 +55,6 @@ libzmq_la_SOURCES = \ reaper.hpp \ rep.hpp \ req.hpp \ - router.hpp \ select.hpp \ session_base.hpp \ signaler.hpp \ @@ -113,7 +112,6 @@ libzmq_la_SOURCES = \ reaper.cpp \ pub.cpp \ random.cpp \ - router.cpp \ rep.cpp \ req.cpp \ select.cpp \ diff --git a/src/router.cpp b/src/router.cpp deleted file mode 100755 index b7e19fbc..00000000 --- a/src/router.cpp +++ /dev/null @@ -1,285 +0,0 @@ -/* - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - - This file is part of 0MQ. - - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#include "router.hpp" -#include "pipe.hpp" -#include "wire.hpp" -#include "random.hpp" -#include "likely.hpp" -#include "wire.hpp" -#include "err.hpp" - -zmq::router_t::router_t (class ctx_t *parent_, uint32_t tid_) : - socket_base_t (parent_, tid_), - prefetched (false), - more_in (false), - current_out (NULL), - more_out (false), - next_peer_id (generate_random ()) -{ - options.type = ZMQ_ROUTER; - - prefetched_msg.init (); -} - -zmq::router_t::~router_t () -{ - zmq_assert (outpipes.empty ()); - prefetched_msg.close (); -} - -void zmq::router_t::xattach_pipe (pipe_t *pipe_) -{ - zmq_assert (pipe_); - - // Generate a new peer ID. Take care to avoid duplicates. - outpipes_t::iterator it = outpipes.lower_bound (next_peer_id); - if (!outpipes.empty ()) { - while (true) { - if (it == outpipes.end ()) - it = outpipes.begin (); - if (it->first != next_peer_id) - break; - ++next_peer_id; - ++it; - } - } - - // Add the pipe to the map out outbound pipes. - outpipe_t outpipe = {pipe_, true}; - bool ok = outpipes.insert (outpipes_t::value_type ( - next_peer_id, outpipe)).second; - zmq_assert (ok); - - // Add the pipe to the list of inbound pipes. - pipe_->set_pipe_id (next_peer_id); - fq.attach (pipe_); - - // Queue the connection command. - pending_command_t cmd = {1, next_peer_id}; - pending_commands.push_back (cmd); - - // Advance next peer ID so that if new connection is dropped shortly after - // its creation we don't accidentally get two subsequent peers with - // the same ID. - ++next_peer_id; -} - -void zmq::router_t::xterminated (pipe_t *pipe_) -{ - fq.terminated (pipe_); - - for (outpipes_t::iterator it = outpipes.begin (); - it != outpipes.end (); ++it) { - if (it->second.pipe == pipe_) { - - // Queue the disconnection command. - pending_command_t cmd = {2, it->first}; - pending_commands.push_back (cmd); - - // Remove the pipe. - outpipes.erase (it); - if (pipe_ == current_out) - current_out = NULL; - return; - } - } - zmq_assert (false); -} - -void zmq::router_t::xread_activated (pipe_t *pipe_) -{ - fq.activated (pipe_); -} - -void zmq::router_t::xwrite_activated (pipe_t *pipe_) -{ - for (outpipes_t::iterator it = outpipes.begin (); - it != outpipes.end (); ++it) { - if (it->second.pipe == pipe_) { - zmq_assert (!it->second.active); - it->second.active = true; - return; - } - } - zmq_assert (false); -} - -int zmq::router_t::xsend (msg_t *msg_, int flags_) -{ - // If this is the first part of the message it's the ID of the - // peer to send the message to. - if (!more_out) { - zmq_assert (!current_out); - - // The first message part has to be label. - if (unlikely (!(msg_->flags () & msg_t::label))) { - errno = EFSM; - return -1; - } - - // Find the pipe associated with the peer ID stored in the message. - if (unlikely (msg_->size () != 4)) { - errno = ECANTROUTE; - return -1; - } - uint32_t peer_id = get_uint32 ((unsigned char*) msg_->data ()); - outpipes_t::iterator it = outpipes.find (peer_id); - if (unlikely (it == outpipes.end ())) { - errno = ECANTROUTE; - return -1; - } - - // Check whether the pipe is available for writing. - msg_t empty; - int rc = empty.init (); - errno_assert (rc == 0); - if (!it->second.pipe->check_write (&empty)) { - rc = empty.close (); - errno_assert (rc == 0); - it->second.active = false; - errno = EAGAIN; - return -1; - } - rc = empty.close (); - errno_assert (rc == 0); - - // Mark the pipe to send the message to. - current_out = it->second.pipe; - more_out = true; - - // Clean up the message object. - rc = msg_->close (); - errno_assert (rc == 0); - rc = msg_->init (); - errno_assert (rc == 0); - return 0; - } - - // Check whether this is the last part of the message. - more_out = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; - - // Push the message into the pipe. If there's no out pipe, just drop it. - if (current_out) { - bool ok = current_out->write (msg_); - if (unlikely (!ok)) - current_out = NULL; - else if (!more_out) { - current_out->flush (); - current_out = NULL; - } - } - else { - int rc = msg_->close (); - errno_assert (rc == 0); - } - - // Detach the message from the data buffer. - int rc = msg_->init (); - errno_assert (rc == 0); - - return 0; -} - -int zmq::router_t::xrecv (msg_t *msg_, int flags_) -{ - // If there's a queued command, pass it to the caller. - if (unlikely (!more_in && !pending_commands.empty ())) { - msg_->init_size (5); - unsigned char *data = (unsigned char*) msg_->data (); - put_uint8 (data, pending_commands.front ().cmd); - put_uint32 (data + 1, pending_commands.front ().peer); - msg_->set_flags (msg_t::command); - pending_commands.pop_front (); - return 0; - } - - // If there is a prefetched message, return it. - if (prefetched) { - int rc = msg_->move (prefetched_msg); - errno_assert (rc == 0); - more_in = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; - prefetched = false; - return 0; - } - - // Get next message part. - pipe_t *pipe; - int rc = fq.recvpipe (msg_, flags_, &pipe); - if (rc != 0) - return -1; - - // If we are in the middle of reading a message, just return the next part. - if (more_in) { - more_in = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; - return 0; - } - - // We are at the beginning of a new message. Move the message part we - // have to the prefetched and return the ID of the peer instead. - rc = prefetched_msg.move (*msg_); - errno_assert (rc == 0); - prefetched = true; - rc = msg_->close (); - errno_assert (rc == 0); - rc = msg_->init_size (4); - errno_assert (rc == 0); - put_uint32 ((unsigned char*) msg_->data (), pipe->get_pipe_id ()); - msg_->set_flags (msg_t::label); - return 0; -} - -int zmq::router_t::rollback (void) -{ - if (current_out) { - current_out->rollback (); - current_out = NULL; - more_out = false; - } - return 0; -} - -bool zmq::router_t::xhas_in () -{ - if (prefetched) - return true; - return fq.has_in () || !pending_commands.empty(); -} - -bool zmq::router_t::xhas_out () -{ - // In theory, GENERIC socket is always ready for writing. Whether actual - // attempt to write succeeds depends on whitch pipe the message is going - // to be routed to. - return true; -} - -zmq::router_session_t::router_session_t (io_thread_t *io_thread_, bool connect_, - socket_base_t *socket_, const options_t &options_, - const char *protocol_, const char *address_) : - session_base_t (io_thread_, connect_, socket_, options_, protocol_, - address_) -{ -} - -zmq::router_session_t::~router_session_t () -{ -} - diff --git a/src/router.hpp b/src/router.hpp deleted file mode 100755 index 9a5c0f91..00000000 --- a/src/router.hpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - - This file is part of 0MQ. - - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#ifndef __ZMQ_ROUTER_HPP_INCLUDED__ -#define __ZMQ_ROUTER_HPP_INCLUDED__ - -#include -#include - -#include "socket_base.hpp" -#include "session_base.hpp" -#include "stdint.hpp" -#include "msg.hpp" -#include "fq.hpp" - -namespace zmq -{ - - class router_t : - public socket_base_t - { - public: - - router_t (class ctx_t *parent_, uint32_t tid_); - ~router_t (); - - // Overloads of functions from socket_base_t. - void xattach_pipe (class pipe_t *pipe_); - int xsend (class msg_t *msg_, int flags_); - int xrecv (class msg_t *msg_, int flags_); - bool xhas_in (); - bool xhas_out (); - void xread_activated (class pipe_t *pipe_); - void xwrite_activated (class pipe_t *pipe_); - void xterminated (class pipe_t *pipe_); - - protected: - - // Rollback any message parts that were sent but not yet flushed. - int rollback (); - - private: - - // Fair queueing object for inbound pipes. - fq_t fq; - - // Have we prefetched a message. - bool prefetched; - - // Holds the prefetched message. - msg_t prefetched_msg; - - // If true, more incoming message parts are expected. - bool more_in; - - struct outpipe_t - { - class pipe_t *pipe; - bool active; - }; - - // Outbound pipes indexed by the peer IDs. - typedef std::map outpipes_t; - outpipes_t outpipes; - - // The pipe we are currently writing to. - class pipe_t *current_out; - - // If true, more outgoing message parts are expected. - bool more_out; - - // Peer ID are generated. It's a simple increment and wrap-over - // algorithm. This value is the next ID to use (if not used already). - uint32_t next_peer_id; - - // Commands to be delivered to the user. - struct pending_command_t - { - uint8_t cmd; - uint32_t peer; - }; - typedef std::deque pending_commands_t; - pending_commands_t pending_commands; - - router_t (const router_t&); - const router_t &operator = (const router_t&); - }; - - class router_session_t : public session_base_t - { - public: - - router_session_t (class io_thread_t *io_thread_, bool connect_, - class socket_base_t *socket_, const options_t &options_, - const char *protocol_, const char *address_); - ~router_session_t (); - - private: - - router_session_t (const router_session_t&); - const router_session_t &operator = (const router_session_t&); - }; - -} - -#endif diff --git a/src/session_base.cpp b/src/session_base.cpp index 32dcd4f7..35c0b46a 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -40,7 +40,6 @@ #include "xsub.hpp" #include "push.hpp" #include "pull.hpp" -#include "router.hpp" #include "pair.hpp" zmq::session_base_t *zmq::session_base_t::create (class io_thread_t *io_thread_, @@ -88,10 +87,6 @@ zmq::session_base_t *zmq::session_base_t::create (class io_thread_t *io_thread_, s = new (std::nothrow) pull_session_t (io_thread_, connect_, socket_, options_, protocol_, address_); break; - case ZMQ_ROUTER: - s = new (std::nothrow) router_session_t (io_thread_, connect_, - socket_, options_, protocol_, address_); - break; case ZMQ_PAIR: s = new (std::nothrow) pair_session_t (io_thread_, connect_, socket_, options_, protocol_, address_); diff --git a/src/socket_base.cpp b/src/socket_base.cpp index a4d89db0..0a5f732c 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -60,7 +60,6 @@ #include "xrep.hpp" #include "xpub.hpp" #include "xsub.hpp" -#include "router.hpp" bool zmq::socket_base_t::check_tag () { @@ -106,9 +105,6 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, case ZMQ_XSUB: s = new (std::nothrow) xsub_t (parent_, tid_); break; - case ZMQ_ROUTER: - s = new (std::nothrow) router_t (parent_, tid_); - break; default: errno = EINVAL; return NULL; From 9227c389331c26d24e515bdd46867013f0cbd641 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 15:51:11 +0100 Subject: [PATCH 09/20] ROUTER and DEALER are aliases for XREP and XREQ Signed-off-by: Martin Sustrik --- include/zmq.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/zmq.h b/include/zmq.h index a262d018..3ddad7e4 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -163,6 +163,9 @@ ZMQ_EXPORT int zmq_term (void *context); #define ZMQ_XPUB 9 #define ZMQ_XSUB 10 +#define ZMQ_ROUTER ZMQ_XREP +#define ZMQ_DEALER ZMQ_XREQ + /* Socket options. */ #define ZMQ_AFFINITY 4 #define ZMQ_SUBSCRIBE 6 From 4b832ea37410035bba7b85e5e9988af8eda648c2 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 15:56:39 +0100 Subject: [PATCH 10/20] Revert the early dropping of request and replies for disconnected clients Signed-off-by: Martin Sustrik --- src/xrep.cpp | 4 +++- src/xreq.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xrep.cpp b/src/xrep.cpp index 9f2a9478..6ca39f4e 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -35,9 +35,11 @@ zmq::xrep_t::xrep_t (class ctx_t *parent_, uint32_t tid_) : { options.type = ZMQ_XREP; + // TODO: Uncomment the following line when XREP will become true XREP + // rather than generic router socket. // If peer disconnect there's noone to send reply to anyway. We can drop // all the outstanding requests from that peer. - options.delay_on_disconnect = false; + // options.delay_on_disconnect = false; prefetched_msg.init (); } diff --git a/src/xreq.cpp b/src/xreq.cpp index 79b3b94f..02a5202c 100644 --- a/src/xreq.cpp +++ b/src/xreq.cpp @@ -27,9 +27,11 @@ zmq::xreq_t::xreq_t (class ctx_t *parent_, uint32_t tid_) : { options.type = ZMQ_XREQ; + // TODO: Uncomment the following line when XREQ will become true XREQ + // rather than generic dealer socket. // If the socket is closing we can drop all the outbound requests. There'll // be noone to receive the replies anyway. - options.delay_on_close = false; + // options.delay_on_close = false; } zmq::xreq_t::~xreq_t () From ac7717b7b35f441fc3aeeb1528e63f147c00913a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 16:20:30 +0100 Subject: [PATCH 11/20] 250bpm copyrights added Signed-off-by: Martin Sustrik --- include/zmq.h | 1 + include/zmq_utils.h | 1 + perf/inproc_lat.cpp | 1 + perf/inproc_thr.cpp | 1 + perf/local_lat.cpp | 1 + perf/local_thr.cpp | 1 + perf/remote_lat.cpp | 1 + perf/remote_thr.cpp | 1 + src/array.hpp | 1 + src/atomic_counter.hpp | 1 + src/atomic_ptr.hpp | 1 + src/clock.cpp | 1 + src/clock.hpp | 1 + src/command.hpp | 1 + src/config.hpp | 1 + src/ctx.cpp | 1 + src/ctx.hpp | 1 + src/decoder.cpp | 1 + src/decoder.hpp | 1 + src/devpoll.cpp | 1 + src/devpoll.hpp | 1 + src/dist.cpp | 1 + src/dist.hpp | 1 + src/encoder.cpp | 1 + src/encoder.hpp | 1 + src/epoll.cpp | 1 + src/epoll.hpp | 1 + src/err.cpp | 1 + src/err.hpp | 1 + src/fd.hpp | 1 + src/fq.cpp | 1 + src/fq.hpp | 1 + src/i_engine.hpp | 1 + src/i_poll_events.hpp | 1 + src/io_object.cpp | 1 + src/io_object.hpp | 1 + src/io_thread.cpp | 1 + src/io_thread.hpp | 1 + src/ip.cpp | 1 + src/ip.hpp | 1 + src/ipc_address.cpp | 1 + src/ipc_address.hpp | 1 + src/ipc_connecter.cpp | 1 + src/ipc_connecter.hpp | 1 + src/ipc_listener.cpp | 1 + src/ipc_listener.hpp | 1 + src/kqueue.cpp | 1 + src/kqueue.hpp | 1 + src/lb.cpp | 1 + src/lb.hpp | 1 + src/likely.hpp | 1 + src/mailbox.cpp | 1 + src/mailbox.hpp | 1 + src/msg.cpp | 1 + src/msg.hpp | 1 + src/mtrie.cpp | 1 + src/mtrie.hpp | 1 + src/mutex.hpp | 1 + src/object.cpp | 1 + src/object.hpp | 1 + src/options.cpp | 1 + src/options.hpp | 1 + src/own.cpp | 1 + src/own.hpp | 1 + src/pair.cpp | 1 + src/pair.hpp | 1 + src/pgm_receiver.cpp | 1 + src/pgm_receiver.hpp | 1 + src/pgm_sender.cpp | 1 + src/pgm_sender.hpp | 1 + src/pgm_socket.cpp | 1 + src/pgm_socket.hpp | 1 + src/pipe.cpp | 1 + src/pipe.hpp | 1 + src/poll.cpp | 1 + src/poll.hpp | 1 + src/poller.hpp | 1 + src/poller_base.cpp | 1 + src/poller_base.hpp | 1 + src/pub.cpp | 1 + src/pub.hpp | 1 + src/pull.cpp | 1 + src/pull.hpp | 1 + src/push.cpp | 1 + src/push.hpp | 1 + src/random.cpp | 1 + src/random.hpp | 1 + src/reaper.cpp | 1 + src/reaper.hpp | 1 + src/rep.cpp | 1 + src/rep.hpp | 1 + src/req.cpp | 1 + src/req.hpp | 1 + src/select.cpp | 1 + src/select.hpp | 1 + src/session_base.cpp | 1 + src/session_base.hpp | 1 + src/signaler.cpp | 1 + src/signaler.hpp | 1 + src/socket_base.cpp | 1 + src/socket_base.hpp | 1 + src/stdint.hpp | 1 + src/stream_engine.cpp | 1 + src/stream_engine.hpp | 1 + src/sub.cpp | 1 + src/sub.hpp | 1 + src/tcp_address.cpp | 1 + src/tcp_address.hpp | 1 + src/tcp_connecter.cpp | 1 + src/tcp_connecter.hpp | 1 + src/tcp_listener.cpp | 1 + src/tcp_listener.hpp | 1 + src/thread.cpp | 1 + src/thread.hpp | 1 + src/trie.cpp | 1 + src/trie.hpp | 1 + src/vtcp_connecter.cpp | 1 + src/vtcp_connecter.hpp | 1 + src/vtcp_listener.cpp | 1 + src/vtcp_listener.hpp | 1 + src/windows.hpp | 1 + src/wire.hpp | 1 + src/xpub.cpp | 1 + src/xpub.hpp | 1 + src/xrep.cpp | 1 + src/xrep.hpp | 1 + src/xreq.cpp | 1 + src/xreq.hpp | 1 + src/xsub.cpp | 1 + src/xsub.hpp | 1 + src/ypipe.hpp | 1 + src/yqueue.hpp | 1 + src/zmq.cpp | 1 + src/zmq_utils.cpp | 1 + tests/test_hwm.cpp | 1 + tests/test_invalid_rep.cpp | 1 + tests/test_pair_inproc.cpp | 1 + tests/test_pair_ipc.cpp | 1 + tests/test_pair_tcp.cpp | 1 + tests/test_reqrep_device.cpp | 1 + tests/test_reqrep_drop.cpp | 1 + tests/test_reqrep_inproc.cpp | 1 + tests/test_reqrep_ipc.cpp | 1 + tests/test_reqrep_tcp.cpp | 1 + tests/test_shutdown_stress.cpp | 1 + tests/test_sub_forward.cpp | 1 + tests/test_timeo.cpp | 1 + tests/testutil.hpp | 1 + 148 files changed, 148 insertions(+) diff --git a/include/zmq.h b/include/zmq.h index 3ddad7e4..bb80d86a 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/include/zmq_utils.h b/include/zmq_utils.h index 6d8a4589..57369964 100644 --- a/include/zmq_utils.h +++ b/include/zmq_utils.h @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/perf/inproc_lat.cpp b/perf/inproc_lat.cpp index 7c150137..8d7699e4 100644 --- a/perf/inproc_lat.cpp +++ b/perf/inproc_lat.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/perf/inproc_thr.cpp b/perf/inproc_thr.cpp index 4673eba2..2fa1013c 100644 --- a/perf/inproc_thr.cpp +++ b/perf/inproc_thr.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/perf/local_lat.cpp b/perf/local_lat.cpp index 999e7991..c58b33b6 100644 --- a/perf/local_lat.cpp +++ b/perf/local_lat.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/perf/local_thr.cpp b/perf/local_thr.cpp index a21707fc..03f5183a 100644 --- a/perf/local_thr.cpp +++ b/perf/local_thr.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/perf/remote_lat.cpp b/perf/remote_lat.cpp index 0d438e90..35659346 100644 --- a/perf/remote_lat.cpp +++ b/perf/remote_lat.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp index c8df3335..3bcb1242 100644 --- a/perf/remote_thr.cpp +++ b/perf/remote_thr.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/array.hpp b/src/array.hpp index b1f6eca3..ca423064 100644 --- a/src/array.hpp +++ b/src/array.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp index d7116d8f..148d21c5 100644 --- a/src/atomic_counter.hpp +++ b/src/atomic_counter.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp index c106cd54..c869193c 100644 --- a/src/atomic_ptr.hpp +++ b/src/atomic_ptr.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/clock.cpp b/src/clock.cpp index f98a2f44..9690ae79 100644 --- a/src/clock.cpp +++ b/src/clock.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/clock.hpp b/src/clock.hpp index 1b349891..072a0a85 100644 --- a/src/clock.hpp +++ b/src/clock.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/command.hpp b/src/command.hpp index 1513ca8d..644b682c 100644 --- a/src/command.hpp +++ b/src/command.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/config.hpp b/src/config.hpp index 96e39deb..4f6af465 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ctx.cpp b/src/ctx.cpp index 8aa10d9b..d8783be8 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ctx.hpp b/src/ctx.hpp index 22ac9321..a92a6935 100644 --- a/src/ctx.hpp +++ b/src/ctx.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/decoder.cpp b/src/decoder.cpp index d57265a9..82e83783 100644 --- a/src/decoder.cpp +++ b/src/decoder.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/decoder.hpp b/src/decoder.hpp index de63a09f..06fc6fb7 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/devpoll.cpp b/src/devpoll.cpp index c4b3c54d..a16ab7d5 100644 --- a/src/devpoll.cpp +++ b/src/devpoll.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/devpoll.hpp b/src/devpoll.hpp index a668e9a6..d5f0e869 100644 --- a/src/devpoll.hpp +++ b/src/devpoll.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/dist.cpp b/src/dist.cpp index b4fae6f7..59e6c083 100644 --- a/src/dist.cpp +++ b/src/dist.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/dist.hpp b/src/dist.hpp index c8d121ca..3de83176 100644 --- a/src/dist.hpp +++ b/src/dist.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/encoder.cpp b/src/encoder.cpp index 8689e45d..a20623fe 100644 --- a/src/encoder.cpp +++ b/src/encoder.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/encoder.hpp b/src/encoder.hpp index 949cbdce..79ca72e2 100644 --- a/src/encoder.hpp +++ b/src/encoder.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/epoll.cpp b/src/epoll.cpp index 39b4547b..ed30987e 100644 --- a/src/epoll.cpp +++ b/src/epoll.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/epoll.hpp b/src/epoll.hpp index dc6b3ed7..4ad35b6e 100644 --- a/src/epoll.hpp +++ b/src/epoll.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/err.cpp b/src/err.cpp index ff81e033..a5f0d0c2 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/err.hpp b/src/err.hpp index 7c7a9d80..3a27dc4f 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/fd.hpp b/src/fd.hpp index 3b150241..e42e5f82 100644 --- a/src/fd.hpp +++ b/src/fd.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/fq.cpp b/src/fq.cpp index abd4160a..6dd70090 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/fq.hpp b/src/fq.hpp index be9c695b..139df394 100644 --- a/src/fq.hpp +++ b/src/fq.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/i_engine.hpp b/src/i_engine.hpp index 26e475bc..09441ec4 100644 --- a/src/i_engine.hpp +++ b/src/i_engine.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/i_poll_events.hpp b/src/i_poll_events.hpp index fa9fb255..038a7f32 100644 --- a/src/i_poll_events.hpp +++ b/src/i_poll_events.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/io_object.cpp b/src/io_object.cpp index e68917ce..31082e16 100644 --- a/src/io_object.cpp +++ b/src/io_object.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/io_object.hpp b/src/io_object.hpp index fb0d1e3a..2d898cdb 100644 --- a/src/io_object.hpp +++ b/src/io_object.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/io_thread.cpp b/src/io_thread.cpp index c6f38803..88cbec7d 100644 --- a/src/io_thread.cpp +++ b/src/io_thread.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/io_thread.hpp b/src/io_thread.hpp index f578d4e6..f00fa61d 100644 --- a/src/io_thread.hpp +++ b/src/io_thread.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ip.cpp b/src/ip.cpp index 8090a8a4..a16d4e25 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ip.hpp b/src/ip.hpp index d8553de4..91f440df 100644 --- a/src/ip.hpp +++ b/src/ip.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ipc_address.cpp b/src/ipc_address.cpp index 6a471a61..5b258241 100644 --- a/src/ipc_address.cpp +++ b/src/ipc_address.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ipc_address.hpp b/src/ipc_address.hpp index 453f5fd0..29671515 100644 --- a/src/ipc_address.hpp +++ b/src/ipc_address.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp index a54e8fe9..78d2e3e9 100644 --- a/src/ipc_connecter.cpp +++ b/src/ipc_connecter.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ipc_connecter.hpp b/src/ipc_connecter.hpp index 721bcf4e..1dbf4dc5 100644 --- a/src/ipc_connecter.hpp +++ b/src/ipc_connecter.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ipc_listener.cpp b/src/ipc_listener.cpp index 5ba41bef..1aeb66b1 100644 --- a/src/ipc_listener.cpp +++ b/src/ipc_listener.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ipc_listener.hpp b/src/ipc_listener.hpp index 4cd881bd..ba1d8bad 100644 --- a/src/ipc_listener.hpp +++ b/src/ipc_listener.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/kqueue.cpp b/src/kqueue.cpp index cbf38d1e..ed830a3e 100644 --- a/src/kqueue.cpp +++ b/src/kqueue.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/kqueue.hpp b/src/kqueue.hpp index 4ded81e8..ac699e92 100644 --- a/src/kqueue.hpp +++ b/src/kqueue.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/lb.cpp b/src/lb.cpp index da7cb9d8..bcef48b5 100644 --- a/src/lb.cpp +++ b/src/lb.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/lb.hpp b/src/lb.hpp index 0dfd25e4..737f811b 100644 --- a/src/lb.hpp +++ b/src/lb.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/likely.hpp b/src/likely.hpp index a524a504..42a8a1f4 100644 --- a/src/likely.hpp +++ b/src/likely.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/mailbox.cpp b/src/mailbox.cpp index 9fd3ac42..5b7461b4 100644 --- a/src/mailbox.cpp +++ b/src/mailbox.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/mailbox.hpp b/src/mailbox.hpp index 0675b990..138bbba3 100644 --- a/src/mailbox.hpp +++ b/src/mailbox.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/msg.cpp b/src/msg.cpp index fba7ec9b..3f97cc89 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/msg.hpp b/src/msg.hpp index 6b4e216f..c0dedd5c 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/mtrie.cpp b/src/mtrie.cpp index 66bea205..93624bf6 100644 --- a/src/mtrie.cpp +++ b/src/mtrie.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/mtrie.hpp b/src/mtrie.hpp index 2c2cc32d..f8632d81 100644 --- a/src/mtrie.hpp +++ b/src/mtrie.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/mutex.hpp b/src/mutex.hpp index 9b13ffaa..e64c429f 100644 --- a/src/mutex.hpp +++ b/src/mutex.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/object.cpp b/src/object.cpp index 807fb048..991f2f8e 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/object.hpp b/src/object.hpp index 1a38b24c..31c443f9 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/options.cpp b/src/options.cpp index 8a3e527e..b2f07c5b 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/options.hpp b/src/options.hpp index 4689522c..7dc2f66b 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/own.cpp b/src/own.cpp index f2ca4b23..d33be8f0 100644 --- a/src/own.cpp +++ b/src/own.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/own.hpp b/src/own.hpp index 0902f73e..80464511 100644 --- a/src/own.hpp +++ b/src/own.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pair.cpp b/src/pair.cpp index 2fa4eac9..1590ea9c 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pair.hpp b/src/pair.hpp index e7390d66..496a07f9 100644 --- a/src/pair.hpp +++ b/src/pair.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp index 6c292cd7..9036ec99 100644 --- a/src/pgm_receiver.cpp +++ b/src/pgm_receiver.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp index b9e9a05e..98558c63 100644 --- a/src/pgm_receiver.hpp +++ b/src/pgm_receiver.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp index 733b1ec2..080f7ef6 100644 --- a/src/pgm_sender.cpp +++ b/src/pgm_sender.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pgm_sender.hpp b/src/pgm_sender.hpp index d3d5924f..be8a469b 100644 --- a/src/pgm_sender.hpp +++ b/src/pgm_sender.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp index 378370c0..0aeea364 100644 --- a/src/pgm_socket.cpp +++ b/src/pgm_socket.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pgm_socket.hpp b/src/pgm_socket.hpp index 8b1be54f..362f65e0 100644 --- a/src/pgm_socket.hpp +++ b/src/pgm_socket.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pipe.cpp b/src/pipe.cpp index c52deb9e..cbf7bf52 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pipe.hpp b/src/pipe.hpp index 437d84d1..7bc2966c 100644 --- a/src/pipe.hpp +++ b/src/pipe.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/poll.cpp b/src/poll.cpp index 9d1978be..ff7d7bbd 100644 --- a/src/poll.cpp +++ b/src/poll.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/poll.hpp b/src/poll.hpp index 42f3af1b..11a84477 100644 --- a/src/poll.hpp +++ b/src/poll.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/poller.hpp b/src/poller.hpp index a8936cec..19f1d6b0 100644 --- a/src/poller.hpp +++ b/src/poller.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/poller_base.cpp b/src/poller_base.cpp index d5fb985b..b611aa37 100644 --- a/src/poller_base.cpp +++ b/src/poller_base.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/poller_base.hpp b/src/poller_base.hpp index 44fe9f1c..d2b99ed5 100644 --- a/src/poller_base.hpp +++ b/src/poller_base.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pub.cpp b/src/pub.cpp index 15ec2915..2a4a196a 100644 --- a/src/pub.cpp +++ b/src/pub.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pub.hpp b/src/pub.hpp index 4a4da0f6..4e0eaa20 100644 --- a/src/pub.hpp +++ b/src/pub.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pull.cpp b/src/pull.cpp index 06575da1..1a04603f 100644 --- a/src/pull.cpp +++ b/src/pull.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pull.hpp b/src/pull.hpp index 6a46eadf..8127fe9a 100644 --- a/src/pull.hpp +++ b/src/pull.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/push.cpp b/src/push.cpp index e91b789e..0d012508 100644 --- a/src/push.cpp +++ b/src/push.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/push.hpp b/src/push.hpp index 1feb71df..d6db6783 100644 --- a/src/push.hpp +++ b/src/push.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/random.cpp b/src/random.cpp index 9f7768ca..e0124911 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/random.hpp b/src/random.hpp index d88b5eea..4b350af7 100644 --- a/src/random.hpp +++ b/src/random.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/reaper.cpp b/src/reaper.cpp index 4c67b37c..d3ef0e5d 100644 --- a/src/reaper.cpp +++ b/src/reaper.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/reaper.hpp b/src/reaper.hpp index edcc319e..e5e7b40d 100644 --- a/src/reaper.hpp +++ b/src/reaper.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/rep.cpp b/src/rep.cpp index 564fa899..de99c8aa 100644 --- a/src/rep.cpp +++ b/src/rep.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/rep.hpp b/src/rep.hpp index 55d57bd3..de9c2b86 100644 --- a/src/rep.hpp +++ b/src/rep.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/req.cpp b/src/req.cpp index 0832f60f..9114daf1 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/req.hpp b/src/req.hpp index 0207a4f0..d99b32a0 100644 --- a/src/req.hpp +++ b/src/req.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/select.cpp b/src/select.cpp index 0ecdcd70..52b605fe 100644 --- a/src/select.cpp +++ b/src/select.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/select.hpp b/src/select.hpp index 55bc8830..407010d9 100644 --- a/src/select.hpp +++ b/src/select.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/session_base.cpp b/src/session_base.cpp index 35c0b46a..59296403 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/session_base.hpp b/src/session_base.hpp index e388d429..e8e25afb 100644 --- a/src/session_base.hpp +++ b/src/session_base.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/signaler.cpp b/src/signaler.cpp index aac3e7ce..80140fd0 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/signaler.hpp b/src/signaler.hpp index dd474d91..6428afbf 100644 --- a/src/signaler.hpp +++ b/src/signaler.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 0a5f732c..1137d223 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/socket_base.hpp b/src/socket_base.hpp index c7c86e77..901aa9ea 100644 --- a/src/socket_base.hpp +++ b/src/socket_base.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/stdint.hpp b/src/stdint.hpp index 73186d3f..78c8ff50 100644 --- a/src/stdint.hpp +++ b/src/stdint.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 2647795c..5c4c1d95 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/stream_engine.hpp b/src/stream_engine.hpp index 92fc55f8..a29ab417 100644 --- a/src/stream_engine.hpp +++ b/src/stream_engine.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/sub.cpp b/src/sub.cpp index d9f2f2ec..36320a7d 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/sub.hpp b/src/sub.hpp index 7d3cf0b7..cf627887 100644 --- a/src/sub.hpp +++ b/src/sub.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp index 0aa564a7..41b703a3 100644 --- a/src/tcp_address.cpp +++ b/src/tcp_address.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/tcp_address.hpp b/src/tcp_address.hpp index 58ac540a..4a70ae8c 100644 --- a/src/tcp_address.hpp +++ b/src/tcp_address.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index fe992522..ee24ee91 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/tcp_connecter.hpp b/src/tcp_connecter.hpp index d1a93cd3..bb5d6a68 100644 --- a/src/tcp_connecter.hpp +++ b/src/tcp_connecter.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index 9b6068cd..eeca49ed 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/tcp_listener.hpp b/src/tcp_listener.hpp index 60713e38..f88ce2de 100644 --- a/src/tcp_listener.hpp +++ b/src/tcp_listener.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/thread.cpp b/src/thread.cpp index d1c67297..b489a2ce 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/thread.hpp b/src/thread.hpp index f3f5f8d9..a6714cdf 100644 --- a/src/thread.hpp +++ b/src/thread.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/trie.cpp b/src/trie.cpp index cd6cb7bd..87720cef 100644 --- a/src/trie.cpp +++ b/src/trie.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/trie.hpp b/src/trie.hpp index a2b55c61..3c556caf 100644 --- a/src/trie.hpp +++ b/src/trie.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/vtcp_connecter.cpp b/src/vtcp_connecter.cpp index 5dc147e7..7a2722ba 100644 --- a/src/vtcp_connecter.cpp +++ b/src/vtcp_connecter.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/vtcp_connecter.hpp b/src/vtcp_connecter.hpp index fe5260ea..6e0cd6ca 100644 --- a/src/vtcp_connecter.hpp +++ b/src/vtcp_connecter.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/vtcp_listener.cpp b/src/vtcp_listener.cpp index 7e496e51..826c6191 100644 --- a/src/vtcp_listener.cpp +++ b/src/vtcp_listener.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/vtcp_listener.hpp b/src/vtcp_listener.hpp index 78f3b517..705ce7de 100644 --- a/src/vtcp_listener.hpp +++ b/src/vtcp_listener.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/windows.hpp b/src/windows.hpp index 8f39914f..17d9b4a1 100644 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/wire.hpp b/src/wire.hpp index bc9dfe54..429c4e0f 100644 --- a/src/wire.hpp +++ b/src/wire.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xpub.cpp b/src/xpub.cpp index a245fea7..de55cec5 100644 --- a/src/xpub.cpp +++ b/src/xpub.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xpub.hpp b/src/xpub.hpp index b410e6ce..1227f4ac 100644 --- a/src/xpub.hpp +++ b/src/xpub.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xrep.cpp b/src/xrep.cpp index 6ca39f4e..61e703be 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xrep.hpp b/src/xrep.hpp index 562f87da..7232c932 100644 --- a/src/xrep.hpp +++ b/src/xrep.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xreq.cpp b/src/xreq.cpp index 02a5202c..ecd4d394 100644 --- a/src/xreq.cpp +++ b/src/xreq.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xreq.hpp b/src/xreq.hpp index d7e28c4d..dcd3d247 100644 --- a/src/xreq.hpp +++ b/src/xreq.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xsub.cpp b/src/xsub.cpp index b24f0820..58c6951a 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xsub.hpp b/src/xsub.hpp index 310df6ec..6548973c 100644 --- a/src/xsub.hpp +++ b/src/xsub.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/ypipe.hpp b/src/ypipe.hpp index da4e85aa..0c48721a 100644 --- a/src/ypipe.hpp +++ b/src/ypipe.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/yqueue.hpp b/src/yqueue.hpp index e436ea45..5e460f19 100644 --- a/src/yqueue.hpp +++ b/src/yqueue.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/zmq.cpp b/src/zmq.cpp index e2bc5090..b06b122a 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/zmq_utils.cpp b/src/zmq_utils.cpp index c7eb60f4..42db473e 100644 --- a/src/zmq_utils.cpp +++ b/src/zmq_utils.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp index 10b26e1d..4f6f8c61 100644 --- a/tests/test_hwm.cpp +++ b/tests/test_hwm.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_invalid_rep.cpp b/tests/test_invalid_rep.cpp index 2657c200..dc902c28 100644 --- a/tests/test_invalid_rep.cpp +++ b/tests/test_invalid_rep.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_pair_inproc.cpp b/tests/test_pair_inproc.cpp index 6194f2ae..8323fe83 100644 --- a/tests/test_pair_inproc.cpp +++ b/tests/test_pair_inproc.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_pair_ipc.cpp b/tests/test_pair_ipc.cpp index 2c83a696..b8361947 100644 --- a/tests/test_pair_ipc.cpp +++ b/tests/test_pair_ipc.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_pair_tcp.cpp b/tests/test_pair_tcp.cpp index 8ecfef5d..82596c95 100644 --- a/tests/test_pair_tcp.cpp +++ b/tests/test_pair_tcp.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_reqrep_device.cpp b/tests/test_reqrep_device.cpp index f6f06c9a..a4519566 100644 --- a/tests/test_reqrep_device.cpp +++ b/tests/test_reqrep_device.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_reqrep_drop.cpp b/tests/test_reqrep_drop.cpp index 65313578..2829f5f2 100644 --- a/tests/test_reqrep_drop.cpp +++ b/tests/test_reqrep_drop.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_reqrep_inproc.cpp b/tests/test_reqrep_inproc.cpp index aeff7ef1..d47f3f2c 100644 --- a/tests/test_reqrep_inproc.cpp +++ b/tests/test_reqrep_inproc.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_reqrep_ipc.cpp b/tests/test_reqrep_ipc.cpp index af15998e..96cff697 100644 --- a/tests/test_reqrep_ipc.cpp +++ b/tests/test_reqrep_ipc.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_reqrep_tcp.cpp b/tests/test_reqrep_tcp.cpp index c713e262..8331c221 100644 --- a/tests/test_reqrep_tcp.cpp +++ b/tests/test_reqrep_tcp.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp index b3ee90f8..65c5a041 100644 --- a/tests/test_shutdown_stress.cpp +++ b/tests/test_shutdown_stress.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_sub_forward.cpp b/tests/test_sub_forward.cpp index d69f923d..7ed6aa78 100644 --- a/tests/test_sub_forward.cpp +++ b/tests/test_sub_forward.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/test_timeo.cpp b/tests/test_timeo.cpp index a8a3fc0d..83d62cc6 100644 --- a/tests/test_timeo.cpp +++ b/tests/test_timeo.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/tests/testutil.hpp b/tests/testutil.hpp index 57db3c4c..e68dc328 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file From 626099aa2a292178872843c55cc5226e6850f2ed Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 16:37:20 +0100 Subject: [PATCH 12/20] VTCP transport removed Signed-off-by: Martin Sustrik --- configure.in | 13 --- src/Makefile.am | 4 - src/session_base.cpp | 13 --- src/socket_base.cpp | 27 +---- src/vtcp_connecter.cpp | 252 ----------------------------------------- src/vtcp_connecter.hpp | 121 -------------------- src/vtcp_listener.cpp | 125 -------------------- src/vtcp_listener.hpp | 72 ------------ 8 files changed, 1 insertion(+), 626 deletions(-) delete mode 100644 src/vtcp_connecter.cpp delete mode 100644 src/vtcp_connecter.hpp delete mode 100644 src/vtcp_listener.cpp delete mode 100644 src/vtcp_listener.hpp diff --git a/configure.in b/configure.in index b0ee7a1f..86147eaa 100644 --- a/configure.in +++ b/configure.in @@ -348,19 +348,6 @@ fi AC_SUBST(pgm_basename) -# VTCP extension -libzmq_vtcp="no" - -AC_ARG_WITH([vtcp], [AS_HELP_STRING([--with-vtcp], - [build libzmq with VTCP extension [default=no]])], - [with_vtcp=$withval], [with_vtcp=no]) - -if test "x$with_vtcp" != "xno"; then - AC_DEFINE(ZMQ_HAVE_VTCP, 1, [Have VTCP extension]) - AC_CHECK_LIB(vtcp, vtcp_bind, , - [AC_MSG_ERROR([cannot link with -lvtcp, install libvtcp.])]) -fi - # Set -Wall, -Werror and -pedantic AC_LANG_PUSH([C++]) diff --git a/src/Makefile.am b/src/Makefile.am index 137ba739..2b6c8f06 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -67,8 +67,6 @@ libzmq_la_SOURCES = \ tcp_listener.hpp \ thread.hpp \ trie.hpp \ - vtcp_connecter.hpp \ - vtcp_listener.hpp \ windows.hpp \ wire.hpp \ xpub.hpp \ @@ -125,8 +123,6 @@ libzmq_la_SOURCES = \ tcp_listener.cpp \ thread.cpp \ trie.cpp \ - vtcp_connecter.cpp \ - vtcp_listener.cpp \ xpub.cpp \ xrep.cpp \ xreq.cpp \ diff --git a/src/session_base.cpp b/src/session_base.cpp index 59296403..d1d31c9c 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -27,7 +27,6 @@ #include "likely.hpp" #include "tcp_connecter.hpp" #include "ipc_connecter.hpp" -#include "vtcp_connecter.hpp" #include "pgm_sender.hpp" #include "pgm_receiver.hpp" @@ -394,18 +393,6 @@ void zmq::session_base_t::start_connecting (bool wait_) } #endif -#if defined ZMQ_HAVE_VTCP - if (protocol == "vtcp") { - - vtcp_connecter_t *connecter = new (std::nothrow) vtcp_connecter_t ( - io_thread, this, options, address.c_str (), - wait_); - alloc_assert (connecter); - launch_child (connecter); - return; - } -#endif - #if defined ZMQ_HAVE_OPENPGM // Both PGM and EPGM transports are using the same infrastructure. diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 1137d223..e990ba16 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -37,7 +37,6 @@ #include "socket_base.hpp" #include "tcp_listener.hpp" #include "ipc_listener.hpp" -#include "vtcp_listener.hpp" #include "tcp_connecter.hpp" #include "io_thread.hpp" #include "session_base.hpp" @@ -173,8 +172,7 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_) { // First check out whether the protcol is something we are aware of. if (protocol_ != "inproc" && protocol_ != "ipc" && protocol_ != "tcp" && - protocol_ != "pgm" && protocol_ != "epgm" && protocol_ != "sys" && - protocol_ != "vtcp") { + protocol_ != "pgm" && protocol_ != "epgm" && protocol_ != "sys") { errno = EPROTONOSUPPORT; return -1; } @@ -188,14 +186,6 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_) } #endif - // If 0MQ is not compiled with VTCP, vtcp transport is not avaialble. -#if !defined ZMQ_HAVE_VTCP - if (protocol_ == "vtcp") { - errno = EPROTONOSUPPORT; - return -1; - } -#endif - // IPC transport is not available on Windows and OpenVMS. #if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS if (protocol_ == "ipc") { @@ -389,21 +379,6 @@ int zmq::socket_base_t::bind (const char *addr_) } #endif -#if defined ZMQ_HAVE_VTCP - if (protocol == "vtcp") { - vtcp_listener_t *listener = new (std::nothrow) vtcp_listener_t ( - io_thread, this, options); - alloc_assert (listener); - int rc = listener->set_address (address.c_str ()); - if (rc != 0) { - delete listener; - return -1; - } - launch_child (listener); - return 0; - } -#endif - zmq_assert (false); return -1; } diff --git a/src/vtcp_connecter.cpp b/src/vtcp_connecter.cpp deleted file mode 100644 index 7a2722ba..00000000 --- a/src/vtcp_connecter.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - - This file is part of 0MQ. - - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#include "vtcp_connecter.hpp" - -#if defined ZMQ_HAVE_VTCP - -#include -#include - -#include "stream_engine.hpp" -#include "io_thread.hpp" -#include "platform.hpp" -#include "random.hpp" -#include "likely.hpp" -#include "err.hpp" -#include "ip.hpp" - -#if defined ZMQ_HAVE_WINDOWS -#include "windows.hpp" -#else -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef ZMQ_HAVE_OPENVMS -#include -#endif -#endif - -zmq::vtcp_connecter_t::vtcp_connecter_t (class io_thread_t *io_thread_, - class session_base_t *session_, const options_t &options_, - const char *address_, bool wait_) : - own_t (io_thread_, options_), - io_object_t (io_thread_), - s (retired_fd), - handle_valid (false), - wait (wait_), - session (session_), - current_reconnect_ivl(options.reconnect_ivl) -{ - subport = 0; - - int rc = set_address (address_); - zmq_assert (rc == 0); -} - -zmq::vtcp_connecter_t::~vtcp_connecter_t () -{ - if (wait) - cancel_timer (reconnect_timer_id); - if (handle_valid) - rm_fd (handle); - - if (s != retired_fd) - close (); -} - -int zmq::vtcp_connecter_t::set_address (const char *addr_) -{ - const char *delimiter = strrchr (addr_, '.'); - if (!delimiter) { - delimiter = strrchr (addr_, ':'); - if (!delimiter) { - errno = EINVAL; - return -1; - } - std::string addr_str (addr_, delimiter - addr_); - addr_str += ":9220"; - std::string subport_str (delimiter + 1); - subport = (vtcp_subport_t) atoi (subport_str.c_str ()); - int rc = address.resolve (addr_str.c_str (), false, true); - if (rc != 0) - return -1; - } - else { - std::string addr_str (addr_, delimiter - addr_); - std::string subport_str (delimiter + 1); - subport = (vtcp_subport_t) atoi (subport_str.c_str ()); - int rc = address.resolve (addr_str.c_str (), false, true); - if (rc != 0) - return -1; - } - - return 0; -} - -void zmq::vtcp_connecter_t::process_plug () -{ - if (wait) - add_reconnect_timer(); - else - start_connecting (); -} - -void zmq::vtcp_connecter_t::in_event () -{ - // We are not polling for incomming data, so we are actually called - // because of error here. However, we can get error on out event as well - // on some platforms, so we'll simply handle both events in the same way. - out_event (); -} - -void zmq::vtcp_connecter_t::out_event () -{ - fd_t fd = connect (); - rm_fd (handle); - handle_valid = false; - - // Handle the error condition by attempt to reconnect. - if (fd == retired_fd) { - close (); - wait = true; - add_reconnect_timer(); - return; - } - - // Create the engine object for this connection. - stream_engine_t *engine = new (std::nothrow) stream_engine_t (fd, options); - alloc_assert (engine); - - // Attach the engine to the corresponding session object. - send_attach (session, engine); - - // Shut the connecter down. - terminate (); -} - -void zmq::vtcp_connecter_t::timer_event (int id_) -{ - zmq_assert (id_ == reconnect_timer_id); - wait = false; - start_connecting (); -} - -void zmq::vtcp_connecter_t::start_connecting () -{ - // Open the connecting socket. - int rc = open (); - - // Handle error condition by eventual reconnect. - if (unlikely (rc != 0)) { - errno_assert (false); - wait = true; - add_reconnect_timer(); - return; - } - - // Connection establishment may be dealyed. Poll for its completion. - handle = add_fd (s); - handle_valid = true; - set_pollout (handle); -} - -void zmq::vtcp_connecter_t::add_reconnect_timer() -{ - add_timer (get_new_reconnect_ivl(), reconnect_timer_id); -} - -int zmq::vtcp_connecter_t::get_new_reconnect_ivl () -{ - // The new interval is the current interval + random value. - int this_interval = current_reconnect_ivl + - (generate_random () % options.reconnect_ivl); - - // Only change the current reconnect interval if the maximum reconnect - // interval was set and if it's larger than the reconnect interval. - if (options.reconnect_ivl_max > 0 && - options.reconnect_ivl_max > options.reconnect_ivl) { - - // Calculate the next interval - current_reconnect_ivl = current_reconnect_ivl * 2; - if(current_reconnect_ivl >= options.reconnect_ivl_max) { - current_reconnect_ivl = options.reconnect_ivl_max; - } - } - return this_interval; -} - -int zmq::vtcp_connecter_t::open () -{ - zmq_assert (s == retired_fd); - - // Start the connection procedure. - sockaddr_in *paddr = (sockaddr_in*) address.addr (); - s = vtcp_connect (paddr->sin_addr.s_addr, ntohs (paddr->sin_port)); - - // Connect was successfull immediately. - if (s != retired_fd) - return 0; - - // Asynchronous connect was launched. - if (errno == EINPROGRESS) { - errno = EAGAIN; - return -1; - } - - // Error occured. - return -1; -} - -zmq::fd_t zmq::vtcp_connecter_t::connect () -{ - int rc = vtcp_acceptc (s, subport); - if (rc != 0) { - int err = errno; - close (); - errno = err; - return retired_fd; - } - - tune_tcp_socket (s); - - fd_t result = s; - s = retired_fd; - return result; -} - -int zmq::vtcp_connecter_t::close () -{ - zmq_assert (s != retired_fd); - int rc = ::close (s); - if (rc != 0) - return -1; - s = retired_fd; - return 0; -} - -#endif - diff --git a/src/vtcp_connecter.hpp b/src/vtcp_connecter.hpp deleted file mode 100644 index 6e0cd6ca..00000000 --- a/src/vtcp_connecter.hpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - - This file is part of 0MQ. - - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#ifndef __VTCP_CONNECTER_HPP_INCLUDED__ -#define __VTCP_CONNECTER_HPP_INCLUDED__ - -#include "platform.hpp" - -#if defined ZMQ_HAVE_VTCP - -#include - -#include "fd.hpp" -#include "own.hpp" -#include "stdint.hpp" -#include "io_object.hpp" -#include "tcp_address.hpp" - -namespace zmq -{ - - class vtcp_connecter_t : public own_t, public io_object_t - { - public: - - // If 'delay' is true connecter first waits for a while, then starts - // connection process. - vtcp_connecter_t (class io_thread_t *io_thread_, - class session_base_t *session_, const options_t &options_, - const char *address_, bool delay_); - ~vtcp_connecter_t (); - - private: - - // ID of the timer used to delay the reconnection. - enum {reconnect_timer_id = 1}; - - // Handlers for incoming commands. - void process_plug (); - - // Handlers for I/O events. - void in_event (); - void out_event (); - void timer_event (int id_); - - // Internal function to start the actual connection establishment. - void start_connecting (); - - // Internal function to add a reconnect timer - void add_reconnect_timer(); - - // Internal function to return a reconnect backoff delay. - // Will modify the current_reconnect_ivl used for next call - // Returns the currently used interval - int get_new_reconnect_ivl (); - - // Set address to connect to. - int set_address (const char *addr_); - - // Open TCP connecting socket. Returns -1 in case of error, - // 0 if connect was successfull immediately and 1 if async connect - // was launched. - int open (); - - // Close the connecting socket. - int close (); - - // Get the file descriptor of newly created connection. Returns - // retired_fd if the connection was unsuccessfull. - fd_t connect (); - - // Address to connect to. - tcp_address_t address; - vtcp_subport_t subport; - - // Underlying socket. - fd_t s; - - // Handle corresponding to the listening socket. - handle_t handle; - - // If true file descriptor is registered with the poller and 'handle' - // contains valid value. - bool handle_valid; - - // If true, connecter is waiting a while before trying to connect. - bool wait; - - // Reference to the session we belong to. - class session_base_t *session; - - // Current reconnect ivl, updated for backoff strategy - int current_reconnect_ivl; - - vtcp_connecter_t (const vtcp_connecter_t&); - const vtcp_connecter_t &operator = (const vtcp_connecter_t&); - }; - -} - -#endif - -#endif diff --git a/src/vtcp_listener.cpp b/src/vtcp_listener.cpp deleted file mode 100644 index 826c6191..00000000 --- a/src/vtcp_listener.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - - This file is part of 0MQ. - - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#include "vtcp_listener.hpp" - -#if defined ZMQ_HAVE_VTCP - -#include -#include -#include - -#include "stream_engine.hpp" -#include "session_base.hpp" -#include "stdint.hpp" -#include "err.hpp" -#include "ip.hpp" - -zmq::vtcp_listener_t::vtcp_listener_t (io_thread_t *io_thread_, - socket_base_t *socket_, options_t &options_) : - own_t (io_thread_, options_), - io_object_t (io_thread_), - s (retired_fd), - socket (socket_) -{ -} - -zmq::vtcp_listener_t::~vtcp_listener_t () -{ - if (s != retired_fd) { - int rc = ::close (s); - errno_assert (rc == 0); - s = retired_fd; - } -} - -int zmq::vtcp_listener_t::set_address (const char *addr_) -{ - // VTCP doesn't allow for binding to a specific interface. Connection - // string has to begin with *: (INADDR_ANY). - if (strlen (addr_) < 2 || addr_ [0] != '*' || addr_ [1] != ':') { - errno = EADDRNOTAVAIL; - return -1; - } - - // Parse port and subport. - uint16_t port; - uint32_t subport; - const char *delimiter = strrchr (addr_, '.'); - if (!delimiter) { - port = 9220; - subport = (uint32_t) atoi (addr_ + 2); - } - else { - std::string port_str (addr_ + 2, delimiter - addr_ - 2); - std::string subport_str (delimiter + 1); - port = (uint16_t) atoi (port_str.c_str ()); - subport = (uint32_t) atoi (subport_str.c_str ()); - } - - // Start listening. - s = vtcp_bind (port, subport); - if (s == retired_fd) - return -1; - - return 0; -} - -void zmq::vtcp_listener_t::process_plug () -{ - // Start polling for incoming connections. - handle = add_fd (s); - set_pollin (handle); -} - -void zmq::vtcp_listener_t::process_term (int linger_) -{ - rm_fd (handle); - own_t::process_term (linger_); -} - -void zmq::vtcp_listener_t::in_event () -{ - fd_t fd = vtcp_acceptb (s); - if (fd == retired_fd) - return; - - tune_tcp_socket (fd); - - // Create the engine object for this connection. - stream_engine_t *engine = new (std::nothrow) stream_engine_t (fd, options); - alloc_assert (engine); - - // Choose I/O thread to run connecter in. Given that we are already - // running in an I/O thread, there must be at least one available. - io_thread_t *io_thread = choose_io_thread (options.affinity); - zmq_assert (io_thread); - - // Create and launch a session object. - session_base_t *session = session_base_t::create (io_thread, false, socket, - options, NULL, NULL); - alloc_assert (session); - session->inc_seqnum (); - launch_child (session); - send_attach (session, engine, false); -} - -#endif diff --git a/src/vtcp_listener.hpp b/src/vtcp_listener.hpp deleted file mode 100644 index 705ce7de..00000000 --- a/src/vtcp_listener.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - - This file is part of 0MQ. - - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#ifndef __ZMQ_VTCP_LISTENER_HPP_INCLUDED__ -#define __ZMQ_VTCP_LISTENER_HPP_INCLUDED__ - -#include "platform.hpp" - -#if defined ZMQ_HAVE_VTCP - -#include "own.hpp" -#include "io_object.hpp" -#include "fd.hpp" - -namespace zmq -{ - - class vtcp_listener_t : public own_t, public io_object_t - { - public: - - vtcp_listener_t (class io_thread_t *io_thread_, - class socket_base_t *socket_, class options_t &options_); - ~vtcp_listener_t (); - - int set_address (const char *addr_); - - private: - - // Handlers for incoming commands. - void process_plug (); - void process_term (int linger_); - - // Handlers for I/O events. - void in_event (); - - // VTCP listener socket. - fd_t s; - - // Handle corresponding to the listening socket. - handle_t handle; - - // Socket the listerner belongs to. - class socket_base_t *socket; - - vtcp_listener_t (const vtcp_listener_t&); - const vtcp_listener_t &operator = (const vtcp_listener_t&); - }; - -} - -#endif - -#endif From 7842c7107358324e8c5b9af7272e6dcab8c97931 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 1 Nov 2011 13:39:54 +0100 Subject: [PATCH 13/20] LABELS and COMMANDs removed Signed-off-by: Martin Sustrik --- include/zmq.h | 5 +- src/dist.cpp | 6 +- src/encoder.cpp | 5 +- src/fq.cpp | 3 +- src/lb.cpp | 6 +- src/msg.hpp | 7 +- src/pipe.cpp | 7 +- src/rep.cpp | 19 ++--- src/req.cpp | 46 ++++------- src/req.hpp | 7 +- src/session_base.cpp | 4 +- src/socket_base.cpp | 33 +------- src/socket_base.hpp | 7 +- src/xpub.cpp | 4 +- src/xrep.cpp | 11 +-- src/xsub.cpp | 10 +-- tests/Makefile.am | 2 - tests/test_invalid_rep.cpp | 13 ++-- tests/test_reqrep_device.cpp | 31 ++------ tests/test_reqrep_drop.cpp | 144 ----------------------------------- 20 files changed, 75 insertions(+), 295 deletions(-) delete mode 100644 tests/test_reqrep_drop.cpp diff --git a/include/zmq.h b/include/zmq.h index bb80d86a..55bb7930 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -189,15 +190,11 @@ ZMQ_EXPORT int zmq_term (void *context); #define ZMQ_MULTICAST_HOPS 25 #define ZMQ_RCVTIMEO 27 #define ZMQ_SNDTIMEO 28 -#define ZMQ_RCVLABEL 29 -#define ZMQ_RCVCMD 30 #define ZMQ_IPV4ONLY 31 /* Send/recv options. */ #define ZMQ_DONTWAIT 1 #define ZMQ_SNDMORE 2 -#define ZMQ_SNDLABEL 4 -#define ZMQ_SNDCMD 8 ZMQ_EXPORT void *zmq_socket (void *context, int type); ZMQ_EXPORT int zmq_close (void *s); diff --git a/src/dist.cpp b/src/dist.cpp index 59e6c083..d4be65bc 100644 --- a/src/dist.cpp +++ b/src/dist.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -112,8 +113,7 @@ int zmq::dist_t::send_to_all (msg_t *msg_, int flags_) int zmq::dist_t::send_to_matching (msg_t *msg_, int flags_) { // Is this end of a multipart message? - bool msg_more = - msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + bool msg_more = msg_->flags () & msg_t::more ? true : false; // Push the message to matching pipes. distribute (msg_, flags_); @@ -182,7 +182,7 @@ bool zmq::dist_t::write (pipe_t *pipe_, msg_t *msg_) eligible--; return false; } - if (!(msg_->flags () & (msg_t::more | msg_t::label))) + if (!(msg_->flags () & msg_t::more)) pipe_->flush (); return true; } diff --git a/src/encoder.cpp b/src/encoder.cpp index a20623fe..94af598d 100644 --- a/src/encoder.cpp +++ b/src/encoder.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -90,14 +91,14 @@ bool zmq::encoder_t::message_ready () tmpbuf [0] = (unsigned char) size; tmpbuf [1] = (in_progress.flags () & ~msg_t::shared); next_step (tmpbuf, 2, &encoder_t::size_ready, - !(in_progress.flags () & (msg_t::more | msg_t::label))); + !(in_progress.flags () & msg_t::more)); } else { tmpbuf [0] = 0xff; put_uint64 (tmpbuf + 1, size); tmpbuf [9] = (in_progress.flags () & ~msg_t::shared); next_step (tmpbuf, 10, &encoder_t::size_ready, - !(in_progress.flags () & (msg_t::more | msg_t::label))); + !(in_progress.flags () & msg_t::more)); } return true; } diff --git a/src/fq.cpp b/src/fq.cpp index 6dd70090..ed1947c0 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -92,7 +93,7 @@ int zmq::fq_t::recvpipe (msg_t *msg_, int flags_, pipe_t **pipe_) if (pipe_) *pipe_ = pipes [current]; more = - msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + msg_->flags () & msg_t::more ? true : false; if (!more) { current++; if (current >= active) diff --git a/src/lb.cpp b/src/lb.cpp index bcef48b5..e100a9ef 100644 --- a/src/lb.cpp +++ b/src/lb.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -76,7 +77,7 @@ int zmq::lb_t::send (msg_t *msg_, int flags_) // switch back to non-dropping mode. if (dropping) { - more = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + more = msg_->flags () & msg_t::more ? true : false; if (!more) dropping = false; @@ -89,8 +90,7 @@ int zmq::lb_t::send (msg_t *msg_, int flags_) while (active > 0) { if (pipes [current]->write (msg_)) { - more = - msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + more = msg_->flags () & msg_t::more ? true : false; break; } diff --git a/src/msg.hpp b/src/msg.hpp index c0dedd5c..bc255986 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -48,10 +49,8 @@ namespace zmq // Mesage flags. enum { - label = 1, - command = 2, - shared = 64, - more = 128 + more = 1, + shared = 128 }; bool check (); diff --git a/src/pipe.cpp b/src/pipe.cpp index cbf7bf52..6dcc01a1 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -137,7 +138,7 @@ bool zmq::pipe_t::read (msg_t *msg_) return false; } - if (!(msg_->flags () & (msg_t::more | msg_t::label))) + if (!(msg_->flags () & msg_t::more)) msgs_read++; if (lwm > 0 && msgs_read % lwm == 0) @@ -166,7 +167,7 @@ bool zmq::pipe_t::write (msg_t *msg_) if (unlikely (!check_write (msg_))) return false; - bool more = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + bool more = msg_->flags () & msg_t::more ? true : false; outpipe->write (*msg_, more); if (!more) msgs_written++; @@ -180,7 +181,7 @@ void zmq::pipe_t::rollback () msg_t msg; if (outpipe) { while (outpipe->unwrite (&msg)) { - zmq_assert (msg.flags () & (msg_t::more | msg_t::label)); + zmq_assert (msg.flags () & msg_t::more); int rc = msg.close (); errno_assert (rc == 0); } diff --git a/src/rep.cpp b/src/rep.cpp index de99c8aa..02a825c1 100644 --- a/src/rep.cpp +++ b/src/rep.cpp @@ -43,7 +43,7 @@ int zmq::rep_t::xsend (msg_t *msg_, int flags_) return -1; } - bool more = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + bool more = msg_->flags () & msg_t::more ? true : false; // Push message to the reply pipe. int rc = xrep_t::xsend (msg_, flags_); @@ -72,19 +72,20 @@ int zmq::rep_t::xrecv (msg_t *msg_, int flags_) int rc = xrep_t::xrecv (msg_, flags_); if (rc != 0) return rc; - if (!(msg_->flags () & msg_t::label)) - break; + zmq_assert (msg_->flags () & msg_t::more); + bool bottom = (msg_->size () == 0); rc = xrep_t::xsend (msg_, flags_); errno_assert (rc == 0); + if (bottom) + break; } request_begins = false; } - else { - int rc = xrep_t::xrecv (msg_, flags_); - if (rc != 0) - return rc; - } - zmq_assert (!(msg_->flags () & msg_t::label)); + + // Get next message part to return to the user. + int rc = xrep_t::xrecv (msg_, flags_); + if (rc != 0) + return rc; // If whole request is read, flip the FSM to reply-sending state. if (!(msg_->flags () & msg_t::more)) { diff --git a/src/req.cpp b/src/req.cpp index 9114daf1..9694d2dd 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -29,8 +30,7 @@ zmq::req_t::req_t (class ctx_t *parent_, uint32_t tid_) : xreq_t (parent_, tid_), receiving_reply (false), - message_begins (true), - request_id (generate_random ()) + message_begins (true) { options.type = ZMQ_REQ; } @@ -50,19 +50,17 @@ int zmq::req_t::xsend (msg_t *msg_, int flags_) // First part of the request is the request identity. if (message_begins) { - msg_t prefix; - int rc = prefix.init_size (4); + msg_t bottom; + int rc = bottom.init (); errno_assert (rc == 0); - prefix.set_flags (msg_t::label); - unsigned char *data = (unsigned char*) prefix.data (); - put_uint32 (data, request_id); - rc = xreq_t::xsend (&prefix, flags_); + bottom.set_flags (msg_t::more); + rc = xreq_t::xsend (&bottom, 0); if (rc != 0) - return rc; + return -1; message_begins = false; } - bool more = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + bool more = msg_->flags () & msg_t::more ? true : false; int rc = xreq_t::xsend (msg_, flags_); if (rc != 0) @@ -92,25 +90,11 @@ int zmq::req_t::xrecv (msg_t *msg_, int flags_) return rc; // TODO: This should also close the connection with the peer! - if (unlikely (!(msg_->flags () & msg_t::label) || msg_->size () != 4)) { + if (unlikely (!(msg_->flags () & msg_t::more) || msg_->size () != 0)) { while (true) { int rc = xreq_t::xrecv (msg_, flags_); errno_assert (rc == 0); - if (!(msg_->flags () & (msg_t::label | msg_t::more))) - break; - } - msg_->close (); - msg_->init (); - errno = EAGAIN; - return -1; - } - - unsigned char *data = (unsigned char*) msg_->data (); - if (unlikely (get_uint32 (data) != request_id)) { - while (true) { - int rc = xreq_t::xrecv (msg_, flags_); - errno_assert (rc == 0); - if (!(msg_->flags () & (msg_t::label | msg_t::more))) + if (!(msg_->flags () & msg_t::more)) break; } msg_->close (); @@ -118,6 +102,7 @@ int zmq::req_t::xrecv (msg_t *msg_, int flags_) errno = EAGAIN; return -1; } + message_begins = false; } @@ -126,8 +111,7 @@ int zmq::req_t::xrecv (msg_t *msg_, int flags_) return rc; // If the reply is fully received, flip the FSM into request-sending state. - if (!(msg_->flags () & (msg_t::more | msg_t::label))) { - request_id++; + if (!(msg_->flags () & msg_t::more)) { receiving_reply = false; message_begins = true; } @@ -167,8 +151,8 @@ zmq::req_session_t::~req_session_t () int zmq::req_session_t::write (msg_t *msg_) { - if (state == request_id) { - if (msg_->flags () == msg_t::label && msg_->size () == 4) { + if (state == bottom) { + if (msg_->flags () == msg_t::more && msg_->size () == 0) { state = body; return xreq_session_t::write (msg_); } @@ -177,7 +161,7 @@ int zmq::req_session_t::write (msg_t *msg_) if (msg_->flags () == msg_t::more) return xreq_session_t::write (msg_); if (msg_->flags () == 0) { - state = request_id; + state = bottom; return xreq_session_t::write (msg_); } } diff --git a/src/req.hpp b/src/req.hpp index d99b32a0..78acbafa 100644 --- a/src/req.hpp +++ b/src/req.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -51,10 +52,6 @@ namespace zmq // of the message must be empty message part (backtrace stack bottom). bool message_begins; - // Request ID. Request numbers gradually increase (and wrap over) - // so that we don't have to generate random ID for each request. - uint32_t request_id; - req_t (const req_t&); const req_t &operator = (const req_t&); }; @@ -74,7 +71,7 @@ namespace zmq private: enum { - request_id, + bottom, body } state; diff --git a/src/session_base.cpp b/src/session_base.cpp index d1d31c9c..591b29e8 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -149,9 +150,8 @@ int zmq::session_base_t::read (msg_t *msg_) errno = EAGAIN; return -1; } + incomplete_in = msg_->flags () & msg_t::more ? true : false; - incomplete_in = - msg_->flags () & (msg_t::more | msg_t::label) ? true : false; return 0; } diff --git a/src/socket_base.cpp b/src/socket_base.cpp index e990ba16..967d314c 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -120,8 +121,6 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_) : destroyed (false), last_tsc (0), ticks (0), - rcvlabel (false), - rcvcmd (false), rcvmore (false) { } @@ -252,26 +251,6 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_, return -1; } - if (option_ == ZMQ_RCVLABEL) { - if (*optvallen_ < sizeof (int)) { - errno = EINVAL; - return -1; - } - *((int*) optval_) = rcvlabel ? 1 : 0; - *optvallen_ = sizeof (int); - return 0; - } - - if (option_ == ZMQ_RCVCMD) { - if (*optvallen_ < sizeof (int)) { - errno = EINVAL; - return -1; - } - *((int*) optval_) = rcvcmd ? 1 : 0; - *optvallen_ = sizeof (int); - return 0; - } - if (option_ == ZMQ_RCVMORE) { if (*optvallen_ < sizeof (int)) { errno = EINVAL; @@ -496,12 +475,8 @@ int zmq::socket_base_t::send (msg_t *msg_, int flags_) return -1; // At this point we impose the flags on the message. - if (flags_ & ZMQ_SNDLABEL) - msg_->set_flags (msg_t::label); if (flags_ & ZMQ_SNDMORE) msg_->set_flags (msg_t::more); - if (flags_ & ZMQ_SNDCMD) - msg_->set_flags (msg_t::command); // Try to send the message. rc = xsend (msg_, flags_); @@ -870,13 +845,7 @@ void zmq::socket_base_t::terminated (pipe_t *pipe_) void zmq::socket_base_t::extract_flags (msg_t *msg_) { - rcvlabel = msg_->flags () & msg_t::label; - if (rcvlabel) - msg_->reset_flags (msg_t::label); rcvmore = msg_->flags () & msg_t::more ? true : false; if (rcvmore) msg_->reset_flags (msg_t::more); - rcvcmd = msg_->flags () & msg_t::command ? true : false; - if (rcvcmd) - msg_->reset_flags (msg_t::command); } diff --git a/src/socket_base.hpp b/src/socket_base.hpp index 901aa9ea..37effa71 100644 --- a/src/socket_base.hpp +++ b/src/socket_base.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -184,12 +185,6 @@ namespace zmq // Number of messages received since last command processing. int ticks; - // True if the last message received had LABEL flag set. - bool rcvlabel; - - // True if the last message received had COMMAND flag set. - bool rcvcmd; - // True if the last message received had MORE flag set. bool rcvmore; diff --git a/src/xpub.cpp b/src/xpub.cpp index de55cec5..dfc334ad 100644 --- a/src/xpub.cpp +++ b/src/xpub.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -101,8 +102,7 @@ void zmq::xpub_t::mark_as_matching (pipe_t *pipe_, void *arg_) int zmq::xpub_t::xsend (msg_t *msg_, int flags_) { - bool msg_more = - msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + bool msg_more = msg_->flags () & msg_t::more ? true : false; // For the first part of multi-part message, find the matching pipes. if (!more) diff --git a/src/xrep.cpp b/src/xrep.cpp index 61e703be..1b0f44d4 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -128,7 +129,7 @@ int zmq::xrep_t::xsend (msg_t *msg_, int flags_) // If we have malformed message (prefix with no subsequent message) // then just silently ignore it. // TODO: The connections should be killed instead. - if (msg_->flags () & msg_t::label) { + if (msg_->flags () & msg_t::more) { more_out = true; @@ -162,7 +163,7 @@ int zmq::xrep_t::xsend (msg_t *msg_, int flags_) } // Check whether this is the last part of the message. - more_out = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + more_out = msg_->flags () & msg_t::more ? true : false; // Push the message into the pipe. If there's no out pipe, just drop it. if (current_out) { @@ -192,7 +193,7 @@ int zmq::xrep_t::xrecv (msg_t *msg_, int flags_) if (prefetched) { int rc = msg_->move (prefetched_msg); errno_assert (rc == 0); - more_in = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + more_in = msg_->flags () & msg_t::more ? true : false; prefetched = false; return 0; } @@ -205,7 +206,7 @@ int zmq::xrep_t::xrecv (msg_t *msg_, int flags_) // If we are in the middle of reading a message, just return the next part. if (more_in) { - more_in = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + more_in = msg_->flags () & msg_t::more ? true : false; return 0; } @@ -219,7 +220,7 @@ int zmq::xrep_t::xrecv (msg_t *msg_, int flags_) rc = msg_->init_size (4); errno_assert (rc == 0); put_uint32 ((unsigned char*) msg_->data (), pipe->get_pipe_id ()); - msg_->set_flags (msg_t::label); + msg_->set_flags (msg_t::more); return 0; } diff --git a/src/xsub.cpp b/src/xsub.cpp index 58c6951a..debcac80 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -117,7 +118,7 @@ int zmq::xsub_t::xrecv (msg_t *msg_, int flags_) int rc = msg_->move (message); errno_assert (rc == 0); has_message = false; - more = msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + more = msg_->flags () & msg_t::more ? true : false; return 0; } @@ -137,14 +138,13 @@ int zmq::xsub_t::xrecv (msg_t *msg_, int flags_) // Check whether the message matches at least one subscription. // Non-initial parts of the message are passed if (more || !options.filter || match (msg_)) { - more = - msg_->flags () & (msg_t::more | msg_t::label) ? true : false; + more = msg_->flags () & msg_t::more ? true : false; return 0; } // Message doesn't match. Pop any remaining parts of the message // from the pipe. - while (msg_->flags () & (msg_t::more | msg_t::label)) { + while (msg_->flags () & msg_t::more) { rc = fq.recv (msg_, ZMQ_DONTWAIT); zmq_assert (rc == 0); } @@ -184,7 +184,7 @@ bool zmq::xsub_t::xhas_in () // Message doesn't match. Pop any remaining parts of the message // from the pipe. - while (message.flags () & (msg_t::more | msg_t::label)) { + while (message.flags () & msg_t::more) { rc = fq.recv (&message, ZMQ_DONTWAIT); zmq_assert (rc == 0); } diff --git a/tests/Makefile.am b/tests/Makefile.am index 6ed37627..5f0cfc1e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,7 +7,6 @@ noinst_PROGRAMS = test_pair_inproc \ test_reqrep_tcp \ test_hwm \ test_reqrep_device \ - test_reqrep_drop \ test_sub_forward \ test_invalid_rep @@ -24,7 +23,6 @@ test_reqrep_inproc_SOURCES = test_reqrep_inproc.cpp testutil.hpp test_reqrep_tcp_SOURCES = test_reqrep_tcp.cpp testutil.hpp test_hwm_SOURCES = test_hwm.cpp test_reqrep_device_SOURCES = test_reqrep_device.cpp -test_reqrep_drop_SOURCES = test_reqrep_drop.cpp test_sub_forward_SOURCES = test_sub_forward.cpp test_invalid_rep_SOURCES = test_invalid_rep.cpp diff --git a/tests/test_invalid_rep.cpp b/tests/test_invalid_rep.cpp index dc902c28..f158b053 100644 --- a/tests/test_invalid_rep.cpp +++ b/tests/test_invalid_rep.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -47,12 +48,12 @@ int main (int argc, char *argv []) // Receive the request. char addr [4]; - char seqn [4]; + char bottom [1]; char body [1]; rc = zmq_recv (xrep_socket, addr, sizeof (addr), 0); assert (rc == 4); - rc = zmq_recv (xrep_socket, seqn, sizeof (seqn), 0); - assert (rc == 4); + rc = zmq_recv (xrep_socket, bottom, sizeof (bottom), 0); + assert (rc == 0); rc = zmq_recv (xrep_socket, body, sizeof (body), 0); assert (rc == 1); @@ -61,10 +62,10 @@ int main (int argc, char *argv []) assert (rc == 4); // Send valid reply. - rc = zmq_send (xrep_socket, addr, 4, ZMQ_SNDLABEL); - assert (rc == 4); - rc = zmq_send (xrep_socket, seqn, 4, ZMQ_SNDLABEL); + rc = zmq_send (xrep_socket, addr, 4, ZMQ_SNDMORE); assert (rc == 4); + rc = zmq_send (xrep_socket, bottom, 0, ZMQ_SNDMORE); + assert (rc == 0); rc = zmq_send (xrep_socket, "b", 1, 0); assert (rc == 1); diff --git a/tests/test_reqrep_device.cpp b/tests/test_reqrep_device.cpp index a4519566..4ee7cf24 100644 --- a/tests/test_reqrep_device.cpp +++ b/tests/test_reqrep_device.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -64,15 +65,11 @@ int main (int argc, char *argv []) assert (rc == 0); rc = zmq_recvmsg (xrep, &msg, 0); assert (rc >= 0); - int rcvlabel; - size_t sz = sizeof (rcvlabel); - rc = zmq_getsockopt (xrep, ZMQ_RCVLABEL, &rcvlabel, &sz); - assert (rc == 0); int rcvmore; + size_t sz = sizeof (rcvmore); rc = zmq_getsockopt (xrep, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); - rc = zmq_sendmsg (xreq, &msg, - (rcvlabel ? ZMQ_SNDLABEL : 0) | (rcvmore ? ZMQ_SNDMORE : 0)); + rc = zmq_sendmsg (xreq, &msg, rcvmore ? ZMQ_SNDMORE : 0); assert (rc >= 0); } @@ -81,21 +78,14 @@ int main (int argc, char *argv []) rc = zmq_recv (rep, buff, 3, 0); assert (rc == 3); assert (memcmp (buff, "ABC", 3) == 0); - int rcvlabel; - size_t sz = sizeof (rcvlabel); - rc = zmq_getsockopt (rep, ZMQ_RCVLABEL, &rcvlabel, &sz); - assert (rc == 0); - assert (!rcvlabel); int rcvmore; + size_t sz = sizeof (rcvmore); rc = zmq_getsockopt (rep, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (rcvmore); rc = zmq_recv (rep, buff, 3, 0); assert (rc == 3); assert (memcmp (buff, "DEF", 3) == 0); - rc = zmq_getsockopt (rep, ZMQ_RCVLABEL, &rcvlabel, &sz); - assert (rc == 0); - assert (!rcvlabel); rc = zmq_getsockopt (rep, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (!rcvmore); @@ -113,15 +103,10 @@ int main (int argc, char *argv []) assert (rc == 0); rc = zmq_recvmsg (xreq, &msg, 0); assert (rc >= 0); - int rcvlabel; - size_t sz = sizeof (rcvlabel); - rc = zmq_getsockopt (xreq, ZMQ_RCVLABEL, &rcvlabel, &sz); - assert (rc == 0); int rcvmore; rc = zmq_getsockopt (xreq, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); - rc = zmq_sendmsg (xrep, &msg, - (rcvlabel ? ZMQ_SNDLABEL : 0) | (rcvmore ? ZMQ_SNDMORE : 0)); + rc = zmq_sendmsg (xrep, &msg, rcvmore ? ZMQ_SNDMORE : 0); assert (rc >= 0); } @@ -129,18 +114,12 @@ int main (int argc, char *argv []) rc = zmq_recv (req, buff, 3, 0); assert (rc == 3); assert (memcmp (buff, "GHI", 3) == 0); - rc = zmq_getsockopt (req, ZMQ_RCVLABEL, &rcvlabel, &sz); - assert (rc == 0); - assert (!rcvlabel); rc = zmq_getsockopt (req, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (rcvmore); rc = zmq_recv (req, buff, 3, 0); assert (rc == 3); assert (memcmp (buff, "JKL", 3) == 0); - rc = zmq_getsockopt (req, ZMQ_RCVLABEL, &rcvlabel, &sz); - assert (rc == 0); - assert (!rcvlabel); rc = zmq_getsockopt (req, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (!rcvmore); diff --git a/tests/test_reqrep_drop.cpp b/tests/test_reqrep_drop.cpp deleted file mode 100644 index 2829f5f2..00000000 --- a/tests/test_reqrep_drop.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - - This file is part of 0MQ. - - 0MQ is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - 0MQ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#include - -#include "../include/zmq.h" -#include "../include/zmq_utils.h" - -int main (int argc, char *argv []) -{ - void *ctx = zmq_init (1); - assert (ctx); - - // Check whether requests are discarded because of disconnected requester. - - // Create a server. - void *xrep = zmq_socket (ctx, ZMQ_XREP); - assert (xrep); - int rc = zmq_bind (xrep, "tcp://127.0.0.1:5560"); - assert (rc == 0); - - // Create a client. - void *xreq = zmq_socket (ctx, ZMQ_XREQ); - assert (xreq); - rc = zmq_connect (xreq, "tcp://127.0.0.1:5560"); - assert (rc == 0); - - // Send requests. - rc = zmq_send (xreq, "ABC", 3, 0); - assert (rc == 3); - rc = zmq_send (xreq, "DEF", 3, 0); - assert (rc == 3); - - // Disconnect client. - rc = zmq_close (xreq); - assert (rc == 0); - - // Wait a while for disconnect to happen. - zmq_sleep (1); - - // Try to receive a request -- it should have been discarded. - char buff [3]; - rc = zmq_recv (xrep, buff, 3, ZMQ_DONTWAIT); - assert (rc < 0); - assert (errno == EAGAIN); - - // Clean up. - rc = zmq_close (xrep); - assert (rc == 0); - - // New test. Check whether reply is dropped because of HWM overflow. - - int one = 1; - xreq = zmq_socket (ctx, ZMQ_XREQ); - assert (xreq); - rc = zmq_setsockopt (xreq, ZMQ_RCVHWM, &one, sizeof(one)); - assert (rc == 0); - rc = zmq_bind (xreq, "inproc://a"); - assert (rc == 0); - - void *rep = zmq_socket (ctx, ZMQ_REP); - assert (rep); - rc = zmq_setsockopt (rep, ZMQ_SNDHWM, &one, sizeof(one)); - assert (rc == 0); - rc = zmq_connect (rep, "inproc://a"); - assert (rc == 0); - - // Send request 1 - rc = zmq_send (xreq, buff, 1, 0); - assert (rc == 1); - - // Send request 2 - rc = zmq_send (xreq, buff, 1, 0); - assert (rc == 1); - - // Receive request 1 - rc = zmq_recv (rep, buff, 1, 0); - assert (rc == 1); - - // Send request 3 - rc = zmq_send (xreq, buff, 1, 0); - assert (rc == 1); - - // Send reply 1 - rc = zmq_send (rep, buff, 1, 0); - assert (rc == 1); - - // Receive request 2 - rc = zmq_recv (rep, buff, 1, 0); - assert (rc == 1); - - // Send reply 2 - rc = zmq_send (rep, buff, 1, 0); - assert (rc == 1); - - // Receive request 3 - rc = zmq_recv (rep, buff, 1, 0); - assert (rc == 1); - - // Send reply 3 - rc = zmq_send (rep, buff, 1, 0); - assert (rc == 1); - - // Receive reply 1 - rc = zmq_recv (xreq, buff, 1, 0); - assert (rc == 1); - - // Receive reply 2 - rc = zmq_recv (xreq, buff, 1, 0); - assert (rc == 1); - - // Try to receive reply 3, it should have been dropped. - rc = zmq_recv (xreq, buff, 1, ZMQ_DONTWAIT); - assert (rc == -1 && errno == EAGAIN); - - // Clean up. - rc = zmq_close (xreq); - assert (rc == 0); - rc = zmq_close (rep); - assert (rc == 0); - - rc = zmq_term (ctx); - assert (rc == 0); - - return 0 ; -} From 7563518929573fc9e729c1dc8bb4aea512fada5a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 1 Nov 2011 13:54:28 +0100 Subject: [PATCH 14/20] Tests print their name before running This makes finding out which test have hung-up easier. Signed-off-by: Martin Sustrik --- tests/test_hwm.cpp | 3 +++ tests/test_invalid_rep.cpp | 3 +++ tests/test_pair_inproc.cpp | 3 +++ tests/test_pair_ipc.cpp | 3 +++ tests/test_pair_tcp.cpp | 3 +++ tests/test_reqrep_device.cpp | 3 +++ tests/test_reqrep_inproc.cpp | 3 +++ tests/test_reqrep_ipc.cpp | 3 +++ tests/test_reqrep_tcp.cpp | 3 +++ tests/test_shutdown_stress.cpp | 3 +++ tests/test_sub_forward.cpp | 3 +++ tests/test_timeo.cpp | 3 +++ 12 files changed, 36 insertions(+) diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp index 4f6f8c61..eff06faa 100644 --- a/tests/test_hwm.cpp +++ b/tests/test_hwm.cpp @@ -21,11 +21,14 @@ #include +#include #include "testutil.hpp" int main (int argc, char *argv []) { + fprintf (stderr, "test_hwm running...\n"); + void *ctx = zmq_init (1); assert (ctx); diff --git a/tests/test_invalid_rep.cpp b/tests/test_invalid_rep.cpp index f158b053..2cab713f 100644 --- a/tests/test_invalid_rep.cpp +++ b/tests/test_invalid_rep.cpp @@ -22,9 +22,12 @@ #include "../include/zmq.h" #include +#include int main (int argc, char *argv []) { + fprintf (stderr, "test_pair_inproc running...\n"); + // Create REQ/XREP wiring. void *ctx = zmq_init (1); assert (ctx); diff --git a/tests/test_pair_inproc.cpp b/tests/test_pair_inproc.cpp index 8323fe83..8b54f68c 100644 --- a/tests/test_pair_inproc.cpp +++ b/tests/test_pair_inproc.cpp @@ -20,10 +20,13 @@ */ #include +#include #include "testutil.hpp" int main (int argc, char *argv []) { + fprintf (stderr, "test_pair_inproc running...\n"); + void *ctx = zmq_init (0); assert (ctx); diff --git a/tests/test_pair_ipc.cpp b/tests/test_pair_ipc.cpp index b8361947..f0be1c66 100644 --- a/tests/test_pair_ipc.cpp +++ b/tests/test_pair_ipc.cpp @@ -20,10 +20,13 @@ */ #include +#include #include "testutil.hpp" int main (int argc, char *argv []) { + fprintf (stderr, "test_pair_ipc running...\n"); + void *ctx = zmq_init (1); assert (ctx); diff --git a/tests/test_pair_tcp.cpp b/tests/test_pair_tcp.cpp index 82596c95..abd7b56c 100644 --- a/tests/test_pair_tcp.cpp +++ b/tests/test_pair_tcp.cpp @@ -20,10 +20,13 @@ */ #include +#include #include "testutil.hpp" int main (int argc, char *argv []) { + fprintf (stderr, "test_pair_tcp running...\n"); + void *ctx = zmq_init (1); assert (ctx); diff --git a/tests/test_reqrep_device.cpp b/tests/test_reqrep_device.cpp index 4ee7cf24..8e8eef44 100644 --- a/tests/test_reqrep_device.cpp +++ b/tests/test_reqrep_device.cpp @@ -22,11 +22,14 @@ #include #include +#include #include "../include/zmq.h" int main (int argc, char *argv []) { + fprintf (stderr, "test_reqrep_device running...\n"); + void *ctx = zmq_init (1); assert (ctx); diff --git a/tests/test_reqrep_inproc.cpp b/tests/test_reqrep_inproc.cpp index d47f3f2c..bc60381e 100644 --- a/tests/test_reqrep_inproc.cpp +++ b/tests/test_reqrep_inproc.cpp @@ -20,10 +20,13 @@ */ #include +#include #include "testutil.hpp" int main (int argc, char *argv []) { + fprintf (stderr, "test_reqrep_inproc running...\n"); + void *ctx = zmq_init (0); assert (ctx); diff --git a/tests/test_reqrep_ipc.cpp b/tests/test_reqrep_ipc.cpp index 96cff697..9644dd12 100644 --- a/tests/test_reqrep_ipc.cpp +++ b/tests/test_reqrep_ipc.cpp @@ -20,10 +20,13 @@ */ #include +#include #include "testutil.hpp" int main (int argc, char *argv []) { + fprintf (stderr, "test_reqrep_ipc running...\n"); + void *ctx = zmq_init (1); assert (ctx); diff --git a/tests/test_reqrep_tcp.cpp b/tests/test_reqrep_tcp.cpp index 8331c221..9f1724ed 100644 --- a/tests/test_reqrep_tcp.cpp +++ b/tests/test_reqrep_tcp.cpp @@ -20,10 +20,13 @@ */ #include +#include #include "testutil.hpp" int main (int argc, char *argv []) { + fprintf (stderr, "test_reqrep_tcp running...\n"); + void *ctx = zmq_init (1); assert (ctx); diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp index 65c5a041..a96c7f64 100644 --- a/tests/test_shutdown_stress.cpp +++ b/tests/test_shutdown_stress.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #define THREAD_COUNT 100 @@ -53,6 +54,8 @@ int main (int argc, char *argv []) int rc; pthread_t threads [THREAD_COUNT]; + fprintf (stderr, "test_shutdown_stress running...\n"); + for (j = 0; j != 10; j++) { // Check the shutdown with many parallel I/O threads. diff --git a/tests/test_sub_forward.cpp b/tests/test_sub_forward.cpp index 7ed6aa78..1a3741c6 100644 --- a/tests/test_sub_forward.cpp +++ b/tests/test_sub_forward.cpp @@ -20,12 +20,15 @@ */ #include +#include #include "../include/zmq.h" #include "../include/zmq_utils.h" int main (int argc, char *argv []) { + fprintf (stderr, "test_sub_forward running...\n"); + void *ctx = zmq_init (1); assert (ctx); diff --git a/tests/test_timeo.cpp b/tests/test_timeo.cpp index 83d62cc6..f17314e6 100644 --- a/tests/test_timeo.cpp +++ b/tests/test_timeo.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "../include/zmq.h" #include "../include/zmq_utils.h" @@ -46,6 +47,8 @@ extern "C" int main (int argc, char *argv []) { + fprintf (stderr, "test_timeo...\n"); + void *ctx = zmq_init (1); assert (ctx); From 1c071f54a6c4444aaa73ace26d7b3a654c26ea5c Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 1 Nov 2011 14:09:54 +0100 Subject: [PATCH 15/20] LABELs removed from the documentation Signed-off-by: Martin Sustrik --- doc/zmq_getsockopt.txt | 13 ------------- doc/zmq_recv.txt | 7 ++----- doc/zmq_recvmsg.txt | 7 ++----- doc/zmq_send.txt | 11 ++--------- doc/zmq_sendmsg.txt | 11 ++--------- doc/zmq_socket.txt | 33 --------------------------------- 6 files changed, 8 insertions(+), 74 deletions(-) diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt index 99065c09..36abbdb3 100644 --- a/doc/zmq_getsockopt.txt +++ b/doc/zmq_getsockopt.txt @@ -39,19 +39,6 @@ Default value:: N/A Applicable socket types:: all -ZMQ_RCVLABEL: Inquires whether last message received was a label -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The 'ZMQ_RCVLABEL' option shall return True (1) if the message part last -received from the 'socket' was an address label. Otherwise, this option -shall return False (0). - -[horizontal] -Option value type:: int -Option value unit:: boolean -Default value:: N/A -Applicable socket types:: all - - ZMQ_RCVMORE: More message data parts to follow ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVMORE' option shall return True (1) if the message part last diff --git a/doc/zmq_recv.txt b/doc/zmq_recv.txt index c9c3ce80..d1ef3e1c 100644 --- a/doc/zmq_recv.txt +++ b/doc/zmq_recv.txt @@ -29,8 +29,7 @@ function shall fail with 'errno' set to EAGAIN. Multi-part messages ~~~~~~~~~~~~~~~~~~~ -A 0MQ message is composed of 1 or more message parts, starting with zero or -more address 'label' parts, followed by 1 or more 'data' parts. Each message +A 0MQ message is composed of 1 or more message parts. Each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages; peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except @@ -38,9 +37,7 @@ by available memory. An application that processes multipart messages must use the _ZMQ_RCVMORE_ linkzmq:zmq_getsockopt[3] option after calling _zmq_recv()_ to determine if -there are further parts to receive. An application that manipulates address -labels must use _ZMQ_RCVLABEL_ to determine the zero or more label parts -that precede the data part(s). +there are further parts to receive. RETURN VALUE ------------ diff --git a/doc/zmq_recvmsg.txt b/doc/zmq_recvmsg.txt index 358ea3f7..6e41b1ec 100644 --- a/doc/zmq_recvmsg.txt +++ b/doc/zmq_recvmsg.txt @@ -29,8 +29,7 @@ function shall fail with 'errno' set to EAGAIN. Multi-part messages ~~~~~~~~~~~~~~~~~~~ -A 0MQ message is composed of 1 or more message parts, starting with zero or -more address 'label' parts, followed by 1 or more 'data' parts. Each message +A 0MQ message is composed of 1 or more message parts. Each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages; peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except @@ -38,9 +37,7 @@ by available memory. An application that processes multipart messages must use the _ZMQ_RCVMORE_ linkzmq:zmq_getsockopt[3] option after calling _zmq_recvmsg()_ to determine if -there are further parts to receive. An application that manipulates address -labels must use _ZMQ_RCVLABEL_ to determine the zero or more label parts -that precede the data part(s). +there are further parts to receive. RETURN VALUE diff --git a/doc/zmq_send.txt b/doc/zmq_send.txt index 133de97f..f00e449d 100644 --- a/doc/zmq_send.txt +++ b/doc/zmq_send.txt @@ -23,11 +23,6 @@ Specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the 'socket', the _zmq_send()_ function shall fail with 'errno' set to EAGAIN. -*ZMQ_SNDLABEL*:: -Specifies that the message part being sent is an address label, and that -further message parts are to follow. Refer to linkzmq:zmq_socket[3] for the -semantics of address labels in each socket pattern. - *ZMQ_SNDMORE*:: Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages @@ -40,16 +35,14 @@ the 'socket' and 0MQ has assumed responsibility for the message. Multi-part messages ~~~~~~~~~~~~~~~~~~~ -A 0MQ message is composed of 1 or more message parts, starting with zero or -more address 'label' parts, followed by 1 or more 'data' parts. Each message +A 0MQ message is composed of 1 or more message parts. Each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages; peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that sends multipart messages must use the _ZMQ_SNDMORE_ flag -when sending each data part except the final one. An application that sends -address labels must use _ZMQ_SNDLABEL_ when sending each label. +when sending each data part except the final one. RETURN VALUE diff --git a/doc/zmq_sendmsg.txt b/doc/zmq_sendmsg.txt index 244c0bd2..d069bd7a 100644 --- a/doc/zmq_sendmsg.txt +++ b/doc/zmq_sendmsg.txt @@ -23,11 +23,6 @@ Specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the 'socket', the _zmq_sendmsg()_ function shall fail with 'errno' set to EAGAIN. -*ZMQ_SNDLABEL*:: -Specifies that the message part being sent is an address 'label', and that -further message parts are to follow. Refer to linkzmq:zmq_socket[3] for the -semantics of address labels in each socket pattern. - *ZMQ_SNDMORE*:: Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages @@ -44,16 +39,14 @@ the 'socket' and 0MQ has assumed responsibility for the message. Multi-part messages ~~~~~~~~~~~~~~~~~~~ -A 0MQ message is composed of 1 or more message parts, starting with zero or -more address 'label' parts, followed by 1 or more 'data' parts. Each message +A 0MQ message is composed of 1 or more message parts. Each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages; peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that sends multipart messages must use the _ZMQ_SNDMORE_ flag -when sending each data part except the final one. An application that sends -address labels must use _ZMQ_SNDLABEL_ when sending each label. +when sending each data part except the final one. RETURN VALUE ------------ diff --git a/doc/zmq_socket.txt b/doc/zmq_socket.txt index e138ebef..1ba2f420 100644 --- a/doc/zmq_socket.txt +++ b/doc/zmq_socket.txt @@ -81,11 +81,6 @@ any linkzmq:zmq_send[3] operations on the socket shall block until the exceptional state ends or at least one _service_ becomes available for sending; messages are not discarded. -'ZMQ_REQ' socket adds a unique 'request ID' label to every outbound message. -When receiving a reply, it checks whether the 'request ID' of the reply matches -the last 'request ID' sent. If it does not, the message is silently dropped and -waiting for the reply is resumed. - [horizontal] .Summary of ZMQ_REQ characteristics Compatible peer sockets:: 'ZMQ_REP' @@ -108,10 +103,6 @@ When a 'ZMQ_REP' socket enters an exceptional state due to having reached the high water mark for a _client_, then any replies sent to the _client_ in question shall be dropped until the exceptional state ends. -'ZMQ_REP' socket strips all the labels from the incoming message, stores them -and passes the remaining data parts to the user. When user sends the reply, -the stored labels are re-attached to the reply. - [horizontal] .Summary of ZMQ_REP characteristics Compatible peer sockets:: 'ZMQ_REQ' @@ -136,8 +127,6 @@ linkzmq:zmq_send[3] operations on the socket shall block until the exceptional state ends or at least one peer becomes available for sending; messages are not discarded. -'ZMQ_XREQ' socket doesn't inspect or modify the message labels. - [horizontal] .Summary of ZMQ_XREQ characteristics Compatible peer sockets:: 'ZMQ_XREP', 'ZMQ_REP' @@ -162,14 +151,6 @@ messages sent to the socket shall be dropped until the exceptional state ends. Likewise, any messages to be routed to a non-existent peer or a peer for which the individual high water mark has been reached shall also be dropped. -When receiving messages a 'ZMQ_XREP' socket attaches a label uniquely -identifying the originating peer to the message before passing it to the -application. - -When sending messages a 'ZMQ_XREP' socket removes the first label from the -message and uses it to determine which the peer the message shall be routed to. -If the peer does not exist anymore the message is silently discarded. - [horizontal] .Summary of ZMQ_XREP characteristics Compatible peer sockets:: 'ZMQ_XREQ', 'ZMQ_REQ' @@ -196,8 +177,6 @@ high water mark for a _subscriber_, then any messages that would be sent to the _subscriber_ in question shall instead be dropped until the exceptional state ends. The _zmq_send()_ function shall never block for this socket type. -This socket type doesn't use message labels. - [horizontal] .Summary of ZMQ_PUB characteristics Compatible peer sockets:: 'ZMQ_SUB', 'ZMQ_XSUB' @@ -215,8 +194,6 @@ any messages, use the 'ZMQ_SUBSCRIBE' option of linkzmq:zmq_setsockopt[3] to specify which messages to subscribe to. The _zmq_send()_ function is not implemented for this socket type. -This socket type doesn't use message labels. - [horizontal] .Summary of ZMQ_SUB characteristics Compatible peer sockets:: 'ZMQ_PUB', 'ZMQ_XPUB' @@ -233,8 +210,6 @@ in form of incoming messages. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. -This socket type doesn't use message labels. - [horizontal] .Summary of ZMQ_XPUB characteristics Compatible peer sockets:: 'ZMQ_SUB', 'ZMQ_XSUB' @@ -250,8 +225,6 @@ Same as ZMQ_SUB except that you subscribe by sending subscription messages to the socket. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. -This socket type doesn't use message labels. - [horizontal] .Summary of ZMQ_XSUB characteristics Compatible peer sockets:: 'ZMQ_PUB', 'ZMQ_XPUB' @@ -282,8 +255,6 @@ _nodes_ at all, then any linkzmq:zmq_send[3] operations on the socket shall block until the exceptional state ends or at least one downstream _node_ becomes available for sending; messages are not discarded. -This socket type doesn't use message labels. - [horizontal] .Summary of ZMQ_PUSH characteristics Compatible peer sockets:: 'ZMQ_PULL' @@ -301,8 +272,6 @@ from upstream pipeline _nodes_. Messages are fair-queued from among all connected upstream _nodes_. The _zmq_send()_ function is not implemented for this socket type. -This socket type doesn't use message labels. - [horizontal] .Summary of ZMQ_PULL characteristics Compatible peer sockets:: 'ZMQ_PUSH' @@ -330,8 +299,6 @@ high water mark for the connected peer, or if no peer is connected, then any linkzmq:zmq_send[3] operations on the socket shall block until the peer becomes available for sending; messages are not discarded. -This socket type doesn't use message labels. - NOTE: 'ZMQ_PAIR' sockets are experimental, and are currently missing several features such as auto-reconnection. From 8a0f5f7650e556bde6c95d7f20c975aa530d3e10 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 1 Nov 2011 14:46:18 +0100 Subject: [PATCH 16/20] Miru copyrights added Signed-off-by: Martin Sustrik --- src/pgm_receiver.cpp | 1 + src/pgm_receiver.hpp | 1 + src/pgm_sender.cpp | 1 + src/pgm_sender.hpp | 1 + src/pgm_socket.cpp | 1 + src/pgm_socket.hpp | 1 + 6 files changed, 6 insertions(+) diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp index 9036ec99..8118b53f 100644 --- a/src/pgm_receiver.cpp +++ b/src/pgm_receiver.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2009-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp index 98558c63..4c58896c 100644 --- a/src/pgm_receiver.hpp +++ b/src/pgm_receiver.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2009-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp index 080f7ef6..cbb6b759 100644 --- a/src/pgm_sender.cpp +++ b/src/pgm_sender.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2009-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_sender.hpp b/src/pgm_sender.hpp index be8a469b..1c0c368b 100644 --- a/src/pgm_sender.hpp +++ b/src/pgm_sender.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2009-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp index 0aeea364..8e469de7 100644 --- a/src/pgm_socket.cpp +++ b/src/pgm_socket.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2009-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_socket.hpp b/src/pgm_socket.hpp index 362f65e0..dcf6de87 100644 --- a/src/pgm_socket.hpp +++ b/src/pgm_socket.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2009-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. From 8e21d64c974344b5b2b83cac85d12c51392fe74b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 1 Nov 2011 18:06:11 +0100 Subject: [PATCH 17/20] Copyright dates adjusted to reflect reality Signed-off-by: Martin Sustrik --- autogen.sh | 2 +- include/zmq.h | 2 +- include/zmq_utils.h | 1 - perf/inproc_lat.cpp | 2 +- perf/inproc_thr.cpp | 2 +- perf/local_lat.cpp | 2 +- perf/local_thr.cpp | 2 +- perf/remote_lat.cpp | 2 +- perf/remote_thr.cpp | 2 +- src/array.hpp | 2 +- src/atomic_counter.hpp | 2 +- src/atomic_ptr.hpp | 2 +- src/clock.cpp | 5 ++--- src/clock.hpp | 5 ++--- src/command.hpp | 2 +- src/config.hpp | 2 +- src/ctx.hpp | 2 +- src/decoder.cpp | 2 +- src/decoder.hpp | 2 +- src/devpoll.cpp | 2 +- src/devpoll.hpp | 2 +- src/dist.cpp | 5 ++--- src/dist.hpp | 5 ++--- src/encoder.cpp | 2 +- src/encoder.hpp | 2 +- src/epoll.cpp | 2 +- src/epoll.hpp | 2 +- src/err.cpp | 2 +- src/err.hpp | 2 +- src/fd.hpp | 3 +-- src/fq.cpp | 2 +- src/fq.hpp | 2 +- src/i_engine.hpp | 2 +- src/i_poll_events.hpp | 4 ++-- src/io_object.cpp | 2 +- src/io_object.hpp | 2 +- src/io_thread.cpp | 2 +- src/io_thread.hpp | 2 +- src/ip.cpp | 4 ++-- src/ip.hpp | 4 ++-- src/ipc_address.cpp | 5 ++--- src/ipc_address.hpp | 5 ++--- src/ipc_connecter.cpp | 5 ++--- src/ipc_connecter.hpp | 5 ++--- src/ipc_listener.cpp | 5 ++--- src/ipc_listener.hpp | 5 ++--- src/kqueue.cpp | 2 +- src/kqueue.hpp | 2 +- src/lb.cpp | 4 ++-- src/lb.hpp | 4 ++-- src/likely.hpp | 3 +-- src/mailbox.cpp | 2 +- src/mailbox.hpp | 2 +- src/msg.cpp | 2 +- src/msg.hpp | 2 +- src/mtrie.cpp | 5 ++--- src/mtrie.hpp | 5 ++--- src/mutex.hpp | 4 ++-- src/object.cpp | 2 +- src/object.hpp | 2 +- src/options.cpp | 2 +- src/options.hpp | 2 +- src/own.cpp | 5 ++--- src/own.hpp | 5 ++--- src/pair.cpp | 2 +- src/pair.hpp | 2 +- src/pgm_receiver.cpp | 4 ++-- src/pgm_receiver.hpp | 4 ++-- src/pgm_sender.cpp | 4 ++-- src/pgm_sender.hpp | 4 ++-- src/pgm_socket.cpp | 4 ++-- src/pgm_socket.hpp | 4 ++-- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/poll.cpp | 2 +- src/poll.hpp | 2 +- src/poller.hpp | 4 ++-- src/poller_base.cpp | 5 ++--- src/poller_base.hpp | 5 ++--- src/pub.cpp | 2 +- src/pub.hpp | 2 +- src/pull.cpp | 2 +- src/pull.hpp | 2 +- src/push.cpp | 2 +- src/push.hpp | 2 +- src/random.cpp | 5 ++--- src/random.hpp | 5 ++--- src/reaper.cpp | 5 ++--- src/reaper.hpp | 5 ++--- src/req.cpp | 2 +- src/req.hpp | 2 +- src/select.cpp | 2 +- src/select.hpp | 2 +- src/session_base.cpp | 2 +- src/session_base.hpp | 2 +- src/signaler.cpp | 5 ++--- src/signaler.hpp | 5 ++--- src/socket_base.cpp | 2 +- src/socket_base.hpp | 2 +- src/stdint.hpp | 3 +-- src/stream_engine.cpp | 2 +- src/stream_engine.hpp | 2 +- src/sub.cpp | 2 +- src/sub.hpp | 2 +- src/tcp_address.cpp | 2 +- src/tcp_address.hpp | 2 +- src/tcp_connecter.cpp | 2 +- src/tcp_connecter.hpp | 2 +- src/tcp_listener.cpp | 2 +- src/tcp_listener.hpp | 2 +- src/thread.cpp | 2 +- src/thread.hpp | 2 +- src/trie.cpp | 2 +- src/trie.hpp | 2 +- src/windows.hpp | 4 ++-- src/wire.hpp | 3 +-- src/xpub.cpp | 5 ++--- src/xpub.hpp | 5 ++--- src/xrep.cpp | 2 +- src/xrep.hpp | 2 +- src/xreq.cpp | 1 - src/xreq.hpp | 2 -- src/xsub.cpp | 5 ++--- src/xsub.hpp | 5 ++--- src/ypipe.hpp | 2 +- src/yqueue.hpp | 2 +- src/zmq_utils.cpp | 2 +- tests/test_hwm.cpp | 5 ++--- tests/test_invalid_rep.cpp | 5 ++--- tests/test_pair_inproc.cpp | 5 ++--- tests/test_pair_ipc.cpp | 5 ++--- tests/test_pair_tcp.cpp | 6 +++--- tests/test_reqrep_device.cpp | 5 ++--- tests/test_reqrep_inproc.cpp | 5 ++--- tests/test_reqrep_ipc.cpp | 5 ++--- tests/test_reqrep_tcp.cpp | 6 +++--- tests/test_shutdown_stress.cpp | 6 +++--- tests/test_sub_forward.cpp | 6 +++--- tests/test_timeo.cpp | 5 ++--- 139 files changed, 192 insertions(+), 234 deletions(-) diff --git a/autogen.sh b/autogen.sh index d03084b7..52a88128 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2007-2011 iMatix Corporation +# Copyright (c) 2007-2009 iMatix Corporation # Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file # # This file is part of 0MQ. diff --git a/include/zmq.h b/include/zmq.h index 55bb7930..e6fc45c9 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2010 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/include/zmq_utils.h b/include/zmq_utils.h index 57369964..341d6399 100644 --- a/include/zmq_utils.h +++ b/include/zmq_utils.h @@ -1,6 +1,5 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/perf/inproc_lat.cpp b/perf/inproc_lat.cpp index 8d7699e4..5b6a830c 100644 --- a/perf/inproc_lat.cpp +++ b/perf/inproc_lat.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/perf/inproc_thr.cpp b/perf/inproc_thr.cpp index 2fa1013c..b4cadfcc 100644 --- a/perf/inproc_thr.cpp +++ b/perf/inproc_thr.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/perf/local_lat.cpp b/perf/local_lat.cpp index c58b33b6..714b8c0f 100644 --- a/perf/local_lat.cpp +++ b/perf/local_lat.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/perf/local_thr.cpp b/perf/local_thr.cpp index 03f5183a..5c495d83 100644 --- a/perf/local_thr.cpp +++ b/perf/local_thr.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/perf/remote_lat.cpp b/perf/remote_lat.cpp index 35659346..9eb76b0b 100644 --- a/perf/remote_lat.cpp +++ b/perf/remote_lat.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp index 3bcb1242..328bdcea 100644 --- a/perf/remote_thr.cpp +++ b/perf/remote_thr.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/array.hpp b/src/array.hpp index ca423064..7e4ddd4a 100644 --- a/src/array.hpp +++ b/src/array.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp index 148d21c5..a0a67bf0 100644 --- a/src/atomic_counter.hpp +++ b/src/atomic_counter.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp index c869193c..c59ab810 100644 --- a/src/atomic_ptr.hpp +++ b/src/atomic_ptr.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/clock.cpp b/src/clock.cpp index 9690ae79..92fc4bef 100644 --- a/src/clock.cpp +++ b/src/clock.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/clock.hpp b/src/clock.hpp index 072a0a85..b3b19b25 100644 --- a/src/clock.hpp +++ b/src/clock.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/command.hpp b/src/command.hpp index 644b682c..ecf2d930 100644 --- a/src/command.hpp +++ b/src/command.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/config.hpp b/src/config.hpp index 4f6af465..c6ac264f 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ctx.hpp b/src/ctx.hpp index a92a6935..619d57e2 100644 --- a/src/ctx.hpp +++ b/src/ctx.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/decoder.cpp b/src/decoder.cpp index 82e83783..48f457f8 100644 --- a/src/decoder.cpp +++ b/src/decoder.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/decoder.hpp b/src/decoder.hpp index 06fc6fb7..c6f9100d 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/devpoll.cpp b/src/devpoll.cpp index a16ab7d5..0c46d14b 100644 --- a/src/devpoll.cpp +++ b/src/devpoll.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/devpoll.hpp b/src/devpoll.hpp index d5f0e869..1de1af07 100644 --- a/src/devpoll.hpp +++ b/src/devpoll.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/dist.cpp b/src/dist.cpp index d4be65bc..d220c438 100644 --- a/src/dist.cpp +++ b/src/dist.cpp @@ -1,8 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 250bpm s.r.o. Copyright (c) 2011 VMware, Inc. - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/dist.hpp b/src/dist.hpp index 3de83176..a72de6e2 100644 --- a/src/dist.hpp +++ b/src/dist.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/encoder.cpp b/src/encoder.cpp index 94af598d..030b3ef5 100644 --- a/src/encoder.cpp +++ b/src/encoder.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/encoder.hpp b/src/encoder.hpp index 79ca72e2..8001c4ed 100644 --- a/src/encoder.hpp +++ b/src/encoder.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/epoll.cpp b/src/epoll.cpp index ed30987e..a62345d4 100644 --- a/src/epoll.cpp +++ b/src/epoll.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/epoll.hpp b/src/epoll.hpp index 4ad35b6e..9bc31a54 100644 --- a/src/epoll.hpp +++ b/src/epoll.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/err.cpp b/src/err.cpp index a5f0d0c2..028d752e 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/err.hpp b/src/err.hpp index 3a27dc4f..53a65697 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/fd.hpp b/src/fd.hpp index e42e5f82..773e3803 100644 --- a/src/fd.hpp +++ b/src/fd.hpp @@ -1,6 +1,5 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/fq.cpp b/src/fq.cpp index ed1947c0..429c0384 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/fq.hpp b/src/fq.hpp index 139df394..24d7b851 100644 --- a/src/fq.hpp +++ b/src/fq.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/i_engine.hpp b/src/i_engine.hpp index 09441ec4..19359b71 100644 --- a/src/i_engine.hpp +++ b/src/i_engine.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/i_poll_events.hpp b/src/i_poll_events.hpp index 038a7f32..9cf47fd7 100644 --- a/src/i_poll_events.hpp +++ b/src/i_poll_events.hpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/io_object.cpp b/src/io_object.cpp index 31082e16..81b9ce5a 100644 --- a/src/io_object.cpp +++ b/src/io_object.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/io_object.hpp b/src/io_object.hpp index 2d898cdb..bf7a625a 100644 --- a/src/io_object.hpp +++ b/src/io_object.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/io_thread.cpp b/src/io_thread.cpp index 88cbec7d..40bbef99 100644 --- a/src/io_thread.cpp +++ b/src/io_thread.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/io_thread.hpp b/src/io_thread.hpp index f00fa61d..986c88d0 100644 --- a/src/io_thread.hpp +++ b/src/io_thread.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ip.cpp b/src/ip.cpp index a16d4e25..0b4596a2 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ip.hpp b/src/ip.hpp index 91f440df..c5f31dbe 100644 --- a/src/ip.hpp +++ b/src/ip.hpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_address.cpp b/src/ipc_address.cpp index 5b258241..d601c565 100644 --- a/src/ipc_address.cpp +++ b/src/ipc_address.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_address.hpp b/src/ipc_address.hpp index 29671515..4a7f2309 100644 --- a/src/ipc_address.hpp +++ b/src/ipc_address.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp index 78d2e3e9..dc0ee216 100644 --- a/src/ipc_connecter.cpp +++ b/src/ipc_connecter.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_connecter.hpp b/src/ipc_connecter.hpp index 1dbf4dc5..c02245a7 100644 --- a/src/ipc_connecter.hpp +++ b/src/ipc_connecter.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_listener.cpp b/src/ipc_listener.cpp index 1aeb66b1..07a7dff6 100644 --- a/src/ipc_listener.cpp +++ b/src/ipc_listener.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ipc_listener.hpp b/src/ipc_listener.hpp index ba1d8bad..0f06d23c 100644 --- a/src/ipc_listener.hpp +++ b/src/ipc_listener.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/kqueue.cpp b/src/kqueue.cpp index ed830a3e..0b07faba 100644 --- a/src/kqueue.cpp +++ b/src/kqueue.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/kqueue.hpp b/src/kqueue.hpp index ac699e92..14f4e499 100644 --- a/src/kqueue.hpp +++ b/src/kqueue.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/lb.cpp b/src/lb.cpp index e100a9ef..2a0f7693 100644 --- a/src/lb.cpp +++ b/src/lb.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/lb.hpp b/src/lb.hpp index 737f811b..1de85490 100644 --- a/src/lb.hpp +++ b/src/lb.hpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/likely.hpp b/src/likely.hpp index 42a8a1f4..e6044645 100644 --- a/src/likely.hpp +++ b/src/likely.hpp @@ -1,7 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2009-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mailbox.cpp b/src/mailbox.cpp index 5b7461b4..ff16afea 100644 --- a/src/mailbox.cpp +++ b/src/mailbox.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mailbox.hpp b/src/mailbox.hpp index 138bbba3..c059c2af 100644 --- a/src/mailbox.hpp +++ b/src/mailbox.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/msg.cpp b/src/msg.cpp index 3f97cc89..60d5bf3a 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/msg.hpp b/src/msg.hpp index bc255986..f2f8fcf6 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/mtrie.cpp b/src/mtrie.cpp index 93624bf6..1c96c98b 100644 --- a/src/mtrie.cpp +++ b/src/mtrie.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mtrie.hpp b/src/mtrie.hpp index f8632d81..8bbc22df 100644 --- a/src/mtrie.hpp +++ b/src/mtrie.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/mutex.hpp b/src/mutex.hpp index e64c429f..8d7068a0 100644 --- a/src/mutex.hpp +++ b/src/mutex.hpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/object.cpp b/src/object.cpp index 991f2f8e..622754cc 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/object.hpp b/src/object.hpp index 31c443f9..f8325963 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/options.cpp b/src/options.cpp index b2f07c5b..ddf29652 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/options.hpp b/src/options.hpp index 7dc2f66b..83443566 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/own.cpp b/src/own.cpp index d33be8f0..d6dd3092 100644 --- a/src/own.cpp +++ b/src/own.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/own.hpp b/src/own.hpp index 80464511..ad5c4528 100644 --- a/src/own.hpp +++ b/src/own.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pair.cpp b/src/pair.cpp index 1590ea9c..6c652db0 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pair.hpp b/src/pair.hpp index 496a07f9..67de2fd6 100644 --- a/src/pair.hpp +++ b/src/pair.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp index 8118b53f..122d1109 100644 --- a/src/pgm_receiver.cpp +++ b/src/pgm_receiver.cpp @@ -1,7 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2009-2011 Miru Limited + Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2010-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp index 4c58896c..3c1d394b 100644 --- a/src/pgm_receiver.hpp +++ b/src/pgm_receiver.hpp @@ -1,7 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2009-2011 Miru Limited + Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2010-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp index cbb6b759..759802f8 100644 --- a/src/pgm_sender.cpp +++ b/src/pgm_sender.cpp @@ -1,7 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2009-2011 Miru Limited + Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2010-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_sender.hpp b/src/pgm_sender.hpp index 1c0c368b..d8f046d5 100644 --- a/src/pgm_sender.hpp +++ b/src/pgm_sender.hpp @@ -1,7 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2009-2011 Miru Limited + Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2010-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp index 8e469de7..0274ee4e 100644 --- a/src/pgm_socket.cpp +++ b/src/pgm_socket.cpp @@ -1,7 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2009-2011 Miru Limited + Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2010-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pgm_socket.hpp b/src/pgm_socket.hpp index dcf6de87..5a5ef99d 100644 --- a/src/pgm_socket.hpp +++ b/src/pgm_socket.hpp @@ -1,7 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2009-2011 Miru Limited + Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2010-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pipe.cpp b/src/pipe.cpp index 6dcc01a1..9f44c948 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/pipe.hpp b/src/pipe.hpp index 7bc2966c..4533e584 100644 --- a/src/pipe.hpp +++ b/src/pipe.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poll.cpp b/src/poll.cpp index ff7d7bbd..1d1c4233 100644 --- a/src/poll.cpp +++ b/src/poll.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poll.hpp b/src/poll.hpp index 11a84477..700256d5 100644 --- a/src/poll.hpp +++ b/src/poll.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poller.hpp b/src/poller.hpp index 19f1d6b0..a989328b 100644 --- a/src/poller.hpp +++ b/src/poller.hpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poller_base.cpp b/src/poller_base.cpp index b611aa37..6e532aef 100644 --- a/src/poller_base.cpp +++ b/src/poller_base.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/poller_base.hpp b/src/poller_base.hpp index d2b99ed5..808ed38a 100644 --- a/src/poller_base.hpp +++ b/src/poller_base.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pub.cpp b/src/pub.cpp index 2a4a196a..7458d5f0 100644 --- a/src/pub.cpp +++ b/src/pub.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pub.hpp b/src/pub.hpp index 4e0eaa20..d418fd47 100644 --- a/src/pub.hpp +++ b/src/pub.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pull.cpp b/src/pull.cpp index 1a04603f..6028118f 100644 --- a/src/pull.cpp +++ b/src/pull.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2010 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/pull.hpp b/src/pull.hpp index 8127fe9a..fa36d497 100644 --- a/src/pull.hpp +++ b/src/pull.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2010 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/push.cpp b/src/push.cpp index 0d012508..a0ed992b 100644 --- a/src/push.cpp +++ b/src/push.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2010 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/push.hpp b/src/push.hpp index d6db6783..ea93693f 100644 --- a/src/push.hpp +++ b/src/push.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2010 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/random.cpp b/src/random.cpp index e0124911..326a3d95 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/random.hpp b/src/random.hpp index 4b350af7..ca3d39a2 100644 --- a/src/random.hpp +++ b/src/random.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/reaper.cpp b/src/reaper.cpp index d3ef0e5d..716f6380 100644 --- a/src/reaper.cpp +++ b/src/reaper.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/reaper.hpp b/src/reaper.hpp index e5e7b40d..1c1533fd 100644 --- a/src/reaper.hpp +++ b/src/reaper.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2011 250bpm s.r.o. + Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/req.cpp b/src/req.cpp index 9694d2dd..40c4765f 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/req.hpp b/src/req.hpp index 78acbafa..61066cad 100644 --- a/src/req.hpp +++ b/src/req.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/select.cpp b/src/select.cpp index 52b605fe..56b87ae6 100644 --- a/src/select.cpp +++ b/src/select.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/select.hpp b/src/select.hpp index 407010d9..9231b6c7 100644 --- a/src/select.hpp +++ b/src/select.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/session_base.cpp b/src/session_base.cpp index 591b29e8..4c5e5127 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/session_base.hpp b/src/session_base.hpp index e8e25afb..86a670f8 100644 --- a/src/session_base.hpp +++ b/src/session_base.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/signaler.cpp b/src/signaler.cpp index 80140fd0..7f8495f9 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/signaler.hpp b/src/signaler.hpp index 6428afbf..4466c985 100644 --- a/src/signaler.hpp +++ b/src/signaler.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 967d314c..583818b2 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/socket_base.hpp b/src/socket_base.hpp index 37effa71..bc978ba5 100644 --- a/src/socket_base.hpp +++ b/src/socket_base.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/stdint.hpp b/src/stdint.hpp index 78c8ff50..b78afcd5 100644 --- a/src/stdint.hpp +++ b/src/stdint.hpp @@ -1,6 +1,5 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 5c4c1d95..11ec2643 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/stream_engine.hpp b/src/stream_engine.hpp index a29ab417..6d122ed1 100644 --- a/src/stream_engine.hpp +++ b/src/stream_engine.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/sub.cpp b/src/sub.cpp index 36320a7d..3249aeab 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/sub.hpp b/src/sub.hpp index cf627887..bb46641a 100644 --- a/src/sub.hpp +++ b/src/sub.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp index 41b703a3..1b7577f3 100644 --- a/src/tcp_address.cpp +++ b/src/tcp_address.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_address.hpp b/src/tcp_address.hpp index 4a70ae8c..d4768c7e 100644 --- a/src/tcp_address.hpp +++ b/src/tcp_address.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index ee24ee91..75079da5 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_connecter.hpp b/src/tcp_connecter.hpp index bb5d6a68..e420c827 100644 --- a/src/tcp_connecter.hpp +++ b/src/tcp_connecter.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index eeca49ed..0b7a90d3 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2010 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/tcp_listener.hpp b/src/tcp_listener.hpp index f88ce2de..e7129987 100644 --- a/src/tcp_listener.hpp +++ b/src/tcp_listener.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2010 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/thread.cpp b/src/thread.cpp index b489a2ce..00628e5c 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. + Copyright (c) 2010-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/thread.hpp b/src/thread.hpp index a6714cdf..52769b1b 100644 --- a/src/thread.hpp +++ b/src/thread.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. + Copyright (c) 2010-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/trie.cpp b/src/trie.cpp index 87720cef..9718c777 100644 --- a/src/trie.cpp +++ b/src/trie.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/trie.hpp b/src/trie.hpp index 3c556caf..76e4fd92 100644 --- a/src/trie.hpp +++ b/src/trie.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/windows.hpp b/src/windows.hpp index 17d9b4a1..5e986b20 100644 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/wire.hpp b/src/wire.hpp index 429c4e0f..b0f4e0ee 100644 --- a/src/wire.hpp +++ b/src/wire.hpp @@ -1,6 +1,5 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/xpub.cpp b/src/xpub.cpp index dfc334ad..5d7a97c4 100644 --- a/src/xpub.cpp +++ b/src/xpub.cpp @@ -1,8 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. Copyright (c) 2011 VMware, Inc. - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/xpub.hpp b/src/xpub.hpp index 1227f4ac..14ffc584 100644 --- a/src/xpub.hpp +++ b/src/xpub.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/xrep.cpp b/src/xrep.cpp index 1b0f44d4..350d7520 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 iMatix Corporation Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file diff --git a/src/xrep.hpp b/src/xrep.hpp index 7232c932..8cec683d 100644 --- a/src/xrep.hpp +++ b/src/xrep.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/xreq.cpp b/src/xreq.cpp index ecd4d394..f4f962f4 100644 --- a/src/xreq.cpp +++ b/src/xreq.cpp @@ -1,6 +1,5 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/xreq.hpp b/src/xreq.hpp index dcd3d247..1d979c5b 100644 --- a/src/xreq.hpp +++ b/src/xreq.hpp @@ -1,9 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file - This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under diff --git a/src/xsub.cpp b/src/xsub.cpp index debcac80..aae2654b 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -1,8 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. Copyright (c) 2011 VMware, Inc. - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/xsub.hpp b/src/xsub.hpp index 6548973c..1eac3902 100644 --- a/src/xsub.hpp +++ b/src/xsub.hpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/ypipe.hpp b/src/ypipe.hpp index 0c48721a..74a96bc8 100644 --- a/src/ypipe.hpp +++ b/src/ypipe.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/yqueue.hpp b/src/yqueue.hpp index 5e460f19..1c83cb87 100644 --- a/src/yqueue.hpp +++ b/src/yqueue.hpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/src/zmq_utils.cpp b/src/zmq_utils.cpp index 42db473e..8f341349 100644 --- a/src/zmq_utils.cpp +++ b/src/zmq_utils.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp index eff06faa..d887b312 100644 --- a/tests/test_hwm.cpp +++ b/tests/test_hwm.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_invalid_rep.cpp b/tests/test_invalid_rep.cpp index 2cab713f..ada7ee11 100644 --- a/tests/test_invalid_rep.cpp +++ b/tests/test_invalid_rep.cpp @@ -1,8 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. Copyright (c) 2011 VMware, Inc. - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_pair_inproc.cpp b/tests/test_pair_inproc.cpp index 8b54f68c..6705cc56 100644 --- a/tests/test_pair_inproc.cpp +++ b/tests/test_pair_inproc.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_pair_ipc.cpp b/tests/test_pair_ipc.cpp index f0be1c66..96a265ff 100644 --- a/tests/test_pair_ipc.cpp +++ b/tests/test_pair_ipc.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_pair_tcp.cpp b/tests/test_pair_tcp.cpp index abd7b56c..464be5a0 100644 --- a/tests/test_pair_tcp.cpp +++ b/tests/test_pair_tcp.cpp @@ -1,7 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2011 iMatix Corporation + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_reqrep_device.cpp b/tests/test_reqrep_device.cpp index 8e8eef44..d861cec3 100644 --- a/tests/test_reqrep_device.cpp +++ b/tests/test_reqrep_device.cpp @@ -1,8 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2010-2011 250bpm s.r.o. Copyright (c) 2011 VMware, Inc. - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_reqrep_inproc.cpp b/tests/test_reqrep_inproc.cpp index bc60381e..f710968a 100644 --- a/tests/test_reqrep_inproc.cpp +++ b/tests/test_reqrep_inproc.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_reqrep_ipc.cpp b/tests/test_reqrep_ipc.cpp index 9644dd12..fd9b28df 100644 --- a/tests/test_reqrep_ipc.cpp +++ b/tests/test_reqrep_ipc.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_reqrep_tcp.cpp b/tests/test_reqrep_tcp.cpp index 9f1724ed..1e6bbbbd 100644 --- a/tests/test_reqrep_tcp.cpp +++ b/tests/test_reqrep_tcp.cpp @@ -1,7 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2011 iMatix Corporation + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp index a96c7f64..811637c1 100644 --- a/tests/test_shutdown_stress.cpp +++ b/tests/test_shutdown_stress.cpp @@ -1,7 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2011 iMatix Corporation + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_sub_forward.cpp b/tests/test_sub_forward.cpp index 1a3741c6..36a7f4a2 100644 --- a/tests/test_sub_forward.cpp +++ b/tests/test_sub_forward.cpp @@ -1,7 +1,7 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2011 iMatix Corporation + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. diff --git a/tests/test_timeo.cpp b/tests/test_timeo.cpp index f17314e6..29ba8a07 100644 --- a/tests/test_timeo.cpp +++ b/tests/test_timeo.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation - Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. From d20ea25b8c63e148fe48cc2b85bac9c896f1073b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Wed, 2 Nov 2011 14:33:58 +0100 Subject: [PATCH 18/20] ZMQ_IDENTITY option re-introduced Signed-off-by: Martin Sustrik --- doc/zmq_getsockopt.txt | 16 ++++++++++++++++ doc/zmq_setsockopt.txt | 17 +++++++++++++++++ include/zmq.h | 1 + src/Makefile.am | 1 + src/blob.hpp | 35 +++++++++++++++++++++++++++++++++++ src/options.cpp | 25 +++++++++++++++++++++++++ src/options.hpp | 5 +++++ 7 files changed, 100 insertions(+) create mode 100644 src/blob.hpp diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt index 36abbdb3..252834e0 100644 --- a/doc/zmq_getsockopt.txt +++ b/doc/zmq_getsockopt.txt @@ -117,6 +117,22 @@ Option value unit:: N/A (bitmap) Default value:: 0 Applicable socket types:: N/A +ZMQ_IDENTITY: Set socket identity +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_IDENTITY' option shall retrieve the identity of the specified 'socket'. +Socket identity is used only by request/reply pattern. Namely, it can be used +in tandem with ROUTER socket to route messages to the peer with specific +identity. + +Identity should be at least one byte and at most 255 bytes long. Identities +starting with binary zero are reserved for use by 0MQ infrastructure. + +[horizontal] +Option value type:: binary data +Option value unit:: N/A +Default value:: NULL +Applicable socket types:: all + ZMQ_RATE: Retrieve multicast data rate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index fd004f47..72d1faa7 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -122,6 +122,23 @@ Default value:: N/A Applicable socket types:: ZMQ_SUB +ZMQ_IDENTITY: Set socket identity +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_IDENTITY' option shall set the identity of the specified 'socket'. +Socket identity is used only by request/reply pattern. Namely, it can be used +in tandem with ROUTER socket to route messages to the peer with specific +identity. + +Identity should be at least one byte and at most 255 bytes long. Identities +starting with binary zero are reserved for use by 0MQ infrastructure. + +[horizontal] +Option value type:: binary data +Option value unit:: N/A +Default value:: NULL +Applicable socket types:: all + + ZMQ_RATE: Set multicast data rate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RATE' option shall set the maximum send or receive data rate for diff --git a/include/zmq.h b/include/zmq.h index e6fc45c9..09ed89c0 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -170,6 +170,7 @@ ZMQ_EXPORT int zmq_term (void *context); /* Socket options. */ #define ZMQ_AFFINITY 4 +#define ZMQ_IDENTITY 5 #define ZMQ_SUBSCRIBE 6 #define ZMQ_UNSUBSCRIBE 7 #define ZMQ_RATE 8 diff --git a/src/Makefile.am b/src/Makefile.am index 2b6c8f06..4d3cba36 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,6 +9,7 @@ libzmq_la_SOURCES = \ array.hpp \ atomic_counter.hpp \ atomic_ptr.hpp \ + blob.hpp \ clock.hpp \ command.hpp \ config.hpp \ diff --git a/src/blob.hpp b/src/blob.hpp new file mode 100644 index 00000000..b8039c4c --- /dev/null +++ b/src/blob.hpp @@ -0,0 +1,35 @@ +/* + Copyright (c) 2010 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file + + This file is part of 0MQ. + + 0MQ is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + 0MQ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#ifndef __ZMQ_BLOB_HPP_INCLUDED__ +#define __ZMQ_BLOB_HPP_INCLUDED__ + +#include + +namespace zmq +{ + + // Object to hold dynamically allocated opaque binary data. + typedef std::basic_string blob_t; + +} + +#endif + diff --git a/src/options.cpp b/src/options.cpp index ddf29652..aa94a218 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -28,6 +29,7 @@ zmq::options_t::options_t () : sndhwm (1000), rcvhwm (1000), affinity (0), + identity_size (0), rate (100), recovery_ivl (10000), multicast_hops (1), @@ -77,6 +79,20 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, affinity = *((uint64_t*) optval_); return 0; + case ZMQ_IDENTITY: + + // Empty identity is invalid as well as identity longer than + // 255 bytes. Identity starting with binary zero is invalid + // as these are used for auto-generated identities. + if (optvallen_ < 1 || optvallen_ > 255 || + *((const unsigned char*) optval_) == 0) { + errno = EINVAL; + return -1; + } + identity_size = optvallen_; + memcpy (identity, optval_, identity_size); + return 0; + case ZMQ_RATE: if (optvallen_ != sizeof (int) || *((int*) optval_) <= 0) { errno = EINVAL; @@ -233,6 +249,15 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) *optvallen_ = sizeof (uint64_t); return 0; + case ZMQ_IDENTITY: + if (*optvallen_ < identity_size) { + errno = EINVAL; + return -1; + } + memcpy (optval_, identity, identity_size); + *optvallen_ = identity_size; + return 0; + case ZMQ_RATE: if (*optvallen_ < sizeof (int)) { errno = EINVAL; diff --git a/src/options.hpp b/src/options.hpp index 83443566..d017c001 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -42,6 +43,10 @@ namespace zmq // I/O thread affinity. uint64_t affinity; + // Socket identity + unsigned char identity_size; + unsigned char identity [256]; + // Maximum tranfer rate [kb/s]. Default 100kb/s. int rate; From a4843b65d24f9caa188bb2454b28080f0cee8484 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 4 Nov 2011 08:00:47 +0100 Subject: [PATCH 19/20] Identities re-introduced However, the "durable socket" behaviour wasn't re-added. Identities are used solely for routing in REQ/REP pattern. Signed-off-by: Martin Sustrik --- src/msg.hpp | 1 + src/options.cpp | 4 +- src/options.hpp | 6 +++ src/pipe.cpp | 11 ++-- src/pipe.hpp | 10 ++-- src/req.cpp | 15 ++++-- src/req.hpp | 1 + src/session_base.cpp | 20 +++++++- src/session_base.hpp | 5 ++ src/socket_base.cpp | 9 ++++ src/xrep.cpp | 100 +++++++++++++++++++++++-------------- src/xrep.hpp | 4 +- src/xreq.cpp | 14 +++++- tests/test_invalid_rep.cpp | 17 ++++--- 14 files changed, 154 insertions(+), 63 deletions(-) diff --git a/src/msg.hpp b/src/msg.hpp index f2f8fcf6..8c846708 100644 --- a/src/msg.hpp +++ b/src/msg.hpp @@ -50,6 +50,7 @@ namespace zmq enum { more = 1, + identity = 64, shared = 128 }; diff --git a/src/options.cpp b/src/options.cpp index aa94a218..4db1a6cb 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -46,7 +46,9 @@ zmq::options_t::options_t () : ipv4only (1), delay_on_close (true), delay_on_disconnect (true), - filter (false) + filter (false), + send_identity (false), + recv_identity (false) { } diff --git a/src/options.hpp b/src/options.hpp index d017c001..bfc9dc79 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -99,6 +99,12 @@ namespace zmq // If 1, (X)SUB socket should filter the messages. If 0, it should not. bool filter; + + // Sends identity to all new connections. + bool send_identity; + + // Receivers identity from all new connections. + bool recv_identity; }; } diff --git a/src/pipe.cpp b/src/pipe.cpp index 9f44c948..25dd51cc 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -65,8 +65,7 @@ zmq::pipe_t::pipe_t (object_t *parent_, upipe_t *inpipe_, upipe_t *outpipe_, peer (NULL), sink (NULL), state (active), - delay (delay_), - pipe_id (0) + delay (delay_) { } @@ -88,14 +87,14 @@ void zmq::pipe_t::set_event_sink (i_pipe_events *sink_) sink = sink_; } -void zmq::pipe_t::set_pipe_id (uint32_t id_) +void zmq::pipe_t::set_identity (const blob_t &identity_) { - pipe_id = id_; + identity = identity_; } -uint32_t zmq::pipe_t::get_pipe_id () +zmq::blob_t zmq::pipe_t::get_identity () { - return pipe_id; + return identity; } bool zmq::pipe_t::check_read () diff --git a/src/pipe.hpp b/src/pipe.hpp index 4533e584..75a20210 100644 --- a/src/pipe.hpp +++ b/src/pipe.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -28,6 +29,7 @@ #include "object.hpp" #include "stdint.hpp" #include "array.hpp" +#include "blob.hpp" namespace zmq { @@ -71,8 +73,8 @@ namespace zmq void set_event_sink (i_pipe_events *sink_); // Pipe endpoint can store an opaque ID to be used by its clients. - void set_pipe_id (uint32_t id_); - uint32_t get_pipe_id (); + void set_identity (const blob_t &identity_); + blob_t get_identity (); // Returns true if there is at least one message to read in the pipe. bool check_read (); @@ -183,8 +185,8 @@ namespace zmq // asks us to. bool delay; - // Opaque ID. To be used by the clients, not the pipe itself. - uint32_t pipe_id; + // Identity of the writer. Used uniquely by the reader side. + blob_t identity; // Returns true if the message is delimiter; false otherwise. static bool is_delimiter (msg_t &msg_); diff --git a/src/req.cpp b/src/req.cpp index 40c4765f..3ba1ec01 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -147,23 +147,32 @@ zmq::req_session_t::req_session_t (io_thread_t *io_thread_, bool connect_, zmq::req_session_t::~req_session_t () { + state = options.recv_identity ? identity : bottom; } int zmq::req_session_t::write (msg_t *msg_) { - if (state == bottom) { + switch (state) { + case bottom: if (msg_->flags () == msg_t::more && msg_->size () == 0) { state = body; return xreq_session_t::write (msg_); } - } - else { + break; + case body: if (msg_->flags () == msg_t::more) return xreq_session_t::write (msg_); if (msg_->flags () == 0) { state = bottom; return xreq_session_t::write (msg_); } + break; + case identity: + if (msg_->flags () == 0) { + state = bottom; + return xreq_session_t::write (msg_); + } + break; } errno = EFAULT; return -1; diff --git a/src/req.hpp b/src/req.hpp index 61066cad..8fae9d40 100644 --- a/src/req.hpp +++ b/src/req.hpp @@ -71,6 +71,7 @@ namespace zmq private: enum { + identity, bottom, body } state; diff --git a/src/session_base.cpp b/src/session_base.cpp index 4c5e5127..f2ee7139 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -112,7 +112,9 @@ zmq::session_base_t::session_base_t (class io_thread_t *io_thread_, engine (NULL), socket (socket_), io_thread (io_thread_), - has_linger_timer (false) + has_linger_timer (false), + send_identity (options_.send_identity), + recv_identity (options_.recv_identity) { if (protocol_) protocol = protocol_; @@ -146,6 +148,16 @@ void zmq::session_base_t::attach_pipe (pipe_t *pipe_) int zmq::session_base_t::read (msg_t *msg_) { + // First message to send is identity (if required). + if (send_identity) { + zmq_assert (!(msg_->flags () & msg_t::more)); + msg_->init_size (options.identity_size); + memcpy (msg_->data (), options.identity, options.identity_size); + send_identity = false; + incomplete_in = false; + return 0; + } + if (!pipe || !pipe->read (msg_)) { errno = EAGAIN; return -1; @@ -157,6 +169,12 @@ int zmq::session_base_t::read (msg_t *msg_) int zmq::session_base_t::write (msg_t *msg_) { + // First message to receive is identity (if required). + if (recv_identity) { + msg_->set_flags (msg_t::identity); + recv_identity = false; + } + if (pipe && pipe->write (msg_)) { int rc = msg_->init (); errno_assert (rc == 0); diff --git a/src/session_base.hpp b/src/session_base.hpp index 86a670f8..c89628f7 100644 --- a/src/session_base.hpp +++ b/src/session_base.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -119,6 +120,10 @@ namespace zmq // True is linger timer is running. bool has_linger_timer; + // If true, identity is to be sent/recvd from the network. + bool send_identity; + bool recv_identity; + // Protocol and address to use when connecting. std::string protocol; std::string address; diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 583818b2..a59ba698 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -845,7 +845,16 @@ void zmq::socket_base_t::terminated (pipe_t *pipe_) void zmq::socket_base_t::extract_flags (msg_t *msg_) { + // Test whether IDENTITY flag is valid for this socket type. + if (unlikely (msg_->flags () & msg_t::identity)) { + zmq_assert (options.recv_identity); +printf ("identity recvd\n"); + } + + + // Remove MORE flag. rcvmore = msg_->flags () & msg_t::more ? true : false; if (rcvmore) msg_->reset_flags (msg_t::more); } + diff --git a/src/xrep.cpp b/src/xrep.cpp index 350d7520..ea19e56d 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -43,6 +43,9 @@ zmq::xrep_t::xrep_t (class ctx_t *parent_, uint32_t tid_) : // all the outstanding requests from that peer. // options.delay_on_disconnect = false; + options.send_identity = true; + options.recv_identity = true; + prefetched_msg.init (); } @@ -56,33 +59,22 @@ void zmq::xrep_t::xattach_pipe (pipe_t *pipe_) { zmq_assert (pipe_); - // Generate a new peer ID. Take care to avoid duplicates. - outpipes_t::iterator it = outpipes.lower_bound (next_peer_id); - if (!outpipes.empty ()) { - while (true) { - if (it == outpipes.end ()) - it = outpipes.begin (); - if (it->first != next_peer_id) - break; - ++next_peer_id; - ++it; - } - } + // Generate a new unique peer identity. + unsigned char buf [5]; + buf [0] = 0; + put_uint32 (buf + 1, next_peer_id); + blob_t identity (buf, 5); + ++next_peer_id; // Add the pipe to the map out outbound pipes. outpipe_t outpipe = {pipe_, true}; bool ok = outpipes.insert (outpipes_t::value_type ( - next_peer_id, outpipe)).second; + identity, outpipe)).second; zmq_assert (ok); // Add the pipe to the list of inbound pipes. - pipe_->set_pipe_id (next_peer_id); - fq.attach (pipe_); - - // Advance next peer ID so that if new connection is dropped shortly after - // its creation we don't accidentally get two subsequent peers with - // the same ID. - ++next_peer_id; + pipe_->set_identity (identity); + fq.attach (pipe_); } void zmq::xrep_t::xterminated (pipe_t *pipe_) @@ -133,26 +125,25 @@ int zmq::xrep_t::xsend (msg_t *msg_, int flags_) more_out = true; - // Find the pipe associated with the peer ID stored in the prefix. + // Find the pipe associated with the identity stored in the prefix. // If there's no such pipe just silently ignore the message. - if (msg_->size () == 4) { - uint32_t peer_id = get_uint32 ((unsigned char*) msg_->data ()); - outpipes_t::iterator it = outpipes.find (peer_id); + blob_t identity ((unsigned char*) msg_->data (), msg_->size ()); + outpipes_t::iterator it = outpipes.find (identity); - if (it != outpipes.end ()) { - current_out = it->second.pipe; - msg_t empty; - int rc = empty.init (); - errno_assert (rc == 0); - if (!current_out->check_write (&empty)) { - it->second.active = false; - more_out = false; - current_out = NULL; - } - rc = empty.close (); - errno_assert (rc == 0); + if (it != outpipes.end ()) { + current_out = it->second.pipe; + msg_t empty; + int rc = empty.init (); + errno_assert (rc == 0); + if (!current_out->check_write (&empty)) { + it->second.active = false; + more_out = false; + current_out = NULL; } + rc = empty.close (); + errno_assert (rc == 0); } + } int rc = msg_->close (); @@ -204,6 +195,37 @@ int zmq::xrep_t::xrecv (msg_t *msg_, int flags_) if (rc != 0) return -1; + // If identity is received, change the key assigned to the pipe. + if (unlikely (msg_->flags () & msg_t::identity)) { + zmq_assert (!more_in); + + // Empty identity means we can preserve the auto-generated identity. + if (msg_->size () != 0) { + + // Actual change of the identity. + outpipes_t::iterator it = outpipes.begin (); + while (it != outpipes.end ()) { + if (it->second.pipe == pipe) { + blob_t identity ((unsigned char*) msg_->data (), + msg_->size ()); + pipe->set_identity (identity); + outpipes.erase (it); + outpipe_t outpipe = {pipe, true}; + outpipes.insert (outpipes_t::value_type (identity, + outpipe)); + break; + } + ++it; + } + zmq_assert (it != outpipes.end ()); + } + + // After processing the identity, try to get the next message. + rc = fq.recvpipe (msg_, flags_, &pipe); + if (rc != 0) + return -1; + } + // If we are in the middle of reading a message, just return the next part. if (more_in) { more_in = msg_->flags () & msg_t::more ? true : false; @@ -217,9 +239,11 @@ int zmq::xrep_t::xrecv (msg_t *msg_, int flags_) prefetched = true; rc = msg_->close (); errno_assert (rc == 0); - rc = msg_->init_size (4); + + blob_t identity = pipe->get_identity (); + rc = msg_->init_size (identity.size ()); errno_assert (rc == 0); - put_uint32 ((unsigned char*) msg_->data (), pipe->get_pipe_id ()); + memcpy (msg_->data (), identity.data (), identity.size ()); msg_->set_flags (msg_t::more); return 0; } diff --git a/src/xrep.hpp b/src/xrep.hpp index 8cec683d..fc02b11e 100644 --- a/src/xrep.hpp +++ b/src/xrep.hpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2011 iMatix Corporation + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -27,6 +28,7 @@ #include "socket_base.hpp" #include "session_base.hpp" #include "stdint.hpp" +#include "blob.hpp" #include "msg.hpp" #include "fq.hpp" @@ -78,7 +80,7 @@ namespace zmq }; // Outbound pipes indexed by the peer IDs. - typedef std::map outpipes_t; + typedef std::map outpipes_t; outpipes_t outpipes; // The pipe we are currently writing to. diff --git a/src/xreq.cpp b/src/xreq.cpp index f4f962f4..91317f79 100644 --- a/src/xreq.cpp +++ b/src/xreq.cpp @@ -1,5 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. + Copyright (c) 2011 VMware, Inc. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -32,6 +33,9 @@ zmq::xreq_t::xreq_t (class ctx_t *parent_, uint32_t tid_) : // If the socket is closing we can drop all the outbound requests. There'll // be noone to receive the replies anyway. // options.delay_on_close = false; + + options.send_identity = true; + options.recv_identity = true; } zmq::xreq_t::~xreq_t () @@ -52,7 +56,15 @@ int zmq::xreq_t::xsend (msg_t *msg_, int flags_) int zmq::xreq_t::xrecv (msg_t *msg_, int flags_) { - return fq.recv (msg_, flags_); + // XREQ socket doesn't use identities. We can safely drop it and + while (true) { + int rc = fq.recv (msg_, flags_); + if (rc != 0) + return rc; + if (likely (!(msg_->flags () & msg_t::identity))) + break; + } + return 0; } bool zmq::xreq_t::xhas_in () diff --git a/tests/test_invalid_rep.cpp b/tests/test_invalid_rep.cpp index ada7ee11..9c77cc4b 100644 --- a/tests/test_invalid_rep.cpp +++ b/tests/test_invalid_rep.cpp @@ -25,7 +25,7 @@ int main (int argc, char *argv []) { - fprintf (stderr, "test_pair_inproc running...\n"); + fprintf (stderr, "test_invalid_rep running...\n"); // Create REQ/XREP wiring. void *ctx = zmq_init (1); @@ -49,23 +49,24 @@ int main (int argc, char *argv []) assert (rc == 1); // Receive the request. - char addr [4]; + char addr [32]; + int addr_size; char bottom [1]; char body [1]; - rc = zmq_recv (xrep_socket, addr, sizeof (addr), 0); - assert (rc == 4); + addr_size = zmq_recv (xrep_socket, addr, sizeof (addr), 0); + assert (addr_size >= 0); rc = zmq_recv (xrep_socket, bottom, sizeof (bottom), 0); assert (rc == 0); rc = zmq_recv (xrep_socket, body, sizeof (body), 0); assert (rc == 1); // Send invalid reply. - rc = zmq_send (xrep_socket, addr, 4, 0); - assert (rc == 4); + rc = zmq_send (xrep_socket, addr, addr_size, 0); + assert (rc == addr_size); // Send valid reply. - rc = zmq_send (xrep_socket, addr, 4, ZMQ_SNDMORE); - assert (rc == 4); + rc = zmq_send (xrep_socket, addr, addr_size, ZMQ_SNDMORE); + assert (rc == addr_size); rc = zmq_send (xrep_socket, bottom, 0, ZMQ_SNDMORE); assert (rc == 0); rc = zmq_send (xrep_socket, "b", 1, 0); From e9c3a227a7175b4eda5193b1c8ce6985f5ed89f3 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 4 Nov 2011 08:05:39 +0100 Subject: [PATCH 20/20] Linking exception corrected Correctly states 'copyright holders' instead of 'iMatix'. Signed-off-by: Martin Sustrik --- COPYING.LESSER | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/COPYING.LESSER b/COPYING.LESSER index 3d13ddb8..99257744 100644 --- a/COPYING.LESSER +++ b/COPYING.LESSER @@ -166,16 +166,16 @@ Library. -------------------------------------------------------------------------------- - SPECIAL EXCEPTION GRANTED BY IMATIX + SPECIAL EXCEPTION GRANTED BY COPYRIGHT HOLDERS -As a special exception, iMatix gives you permission to link this library with -independent modules to produce an executable, regardless of the license terms -of these independent modules, and to copy and distribute the resulting -executable under terms of your choice, provided that you also meet, for each -linked independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from or based on -this library. If you modify this library, you must extend this exception to your -version of the library. +As a special exception, copyright holders give you permission to link this +library with independent modules to produce an executable, regardless of +the license terms of these independent modules, and to copy and distribute +the resulting executable under terms of your choice, provided that you also +meet, for each linked independent module, the terms and conditions of +the license of that module. An independent module is a module which is not +derived from or based on this library. If you modify this library, you must +extend this exception to your version of the library. --------------------------------------------------------------------------------