From 1b706ac02858aee4c960331dc7100f8c14312848 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Thu, 27 Oct 2011 11:48:58 +0200 Subject: 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 f374de9..ff81e03 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 9558a10..7c7a9d8 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) -- cgit v1.2.3 From 68ab5f87edd2436757ab92b22238a5a4114d7b0d Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 27 Oct 2011 11:51:23 +0200 Subject: 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 589a160..52313ac 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 -- cgit v1.2.3 From 9e000c8f26c99656dd967a8d15997b879af5817b Mon Sep 17 00:00:00 2001 From: Ben Gray Date: Thu, 27 Oct 2011 13:59:54 +0200 Subject: 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 795e13e..b4fae6f 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 e51ab67..fba7ec9 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 514f95b..6b4e216 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. -- cgit v1.2.3 From 9b3e61a178af5c5e373c701a11697051c4c9a50a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 27 Oct 2011 14:02:57 +0200 Subject: 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 52313ac..37c47a0 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 -- cgit v1.2.3 From 52bab42212c263a51b219ae8714c481bc948cb4e Mon Sep 17 00:00:00 2001 From: Bernd Prager Date: Thu, 27 Oct 2011 17:11:28 +0200 Subject: 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 0f54fab..e2bc509 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); -- cgit v1.2.3 From 09574a6104ce824c43fe8261d31451ccb337d11b Mon Sep 17 00:00:00 2001 From: Perry Kundert Date: Sat, 29 Oct 2011 14:47:53 +0200 Subject: 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 04a19fb..0832f60 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); -- cgit v1.2.3 From 541b83bc02784c721efa3d9dde8f8a191c3c3b7b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 29 Oct 2011 14:49:08 +0200 Subject: 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 37c47a0..5ebf390 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 -- cgit v1.2.3 From dee8b2360ac0084165401dd61fc485226402124d Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 15:44:42 +0100 Subject: 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 e236b2a..a262d01 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 3b7dec6..137ba73 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 b7e19fb..0000000 --- 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 9a5c0f9..0000000 --- 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 32dcd4f..35c0b46 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 a4d89db..0a5f732 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; -- cgit v1.2.3 From 9227c389331c26d24e515bdd46867013f0cbd641 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 15:51:11 +0100 Subject: 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 a262d01..3ddad7e 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 -- cgit v1.2.3 From 4b832ea37410035bba7b85e5e9988af8eda648c2 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 15:56:39 +0100 Subject: 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 9f2a947..6ca39f4 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 79b3b94..02a5202 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 () -- cgit v1.2.3 From ac7717b7b35f441fc3aeeb1528e63f147c00913a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 16:20:30 +0100 Subject: 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 3ddad7e..bb80d86 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 6d8a458..5736996 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 7c15013..8d7699e 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 4673eba..2fa1013 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 999e799..c58b33b 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 a21707f..03f5183 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 0d438e9..3565934 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 c8df333..3bcb124 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 b1f6eca..ca42306 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 d7116d8..148d21c 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 c106cd5..c869193 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 f98a2f4..9690ae7 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 1b34989..072a0a8 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 1513ca8..644b682 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 96e39de..4f6af46 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 8aa10d9..d8783be 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 22ac932..a92a693 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 d57265a..82e8378 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 de63a09..06fc6fb 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 c4b3c54..a16ab7d 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 a668e9a..d5f0e86 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 b4fae6f..59e6c08 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 c8d121c..3de8317 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 8689e45..a20623f 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 949cbdc..79ca72e 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 39b4547..ed30987 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 dc6b3ed..4ad35b6 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 ff81e03..a5f0d0c 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 7c7a9d8..3a27dc4 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 3b15024..e42e5f8 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 abd4160..6dd7009 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 be9c695..139df39 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 26e475b..09441ec 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 fa9fb25..038a7f3 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 e68917c..31082e1 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 fb0d1e3..2d898cd 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 c6f3880..88cbec7 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 f578d4e..f00fa61 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 8090a8a..a16d4e2 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 d8553de..91f440d 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 6a471a6..5b25824 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 453f5fd..2967151 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 a54e8fe..78d2e3e 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 721bcf4..1dbf4dc 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 5ba41be..1aeb66b 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 4cd881b..ba1d8ba 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 cbf38d1..ed830a3 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 4ded81e..ac699e9 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 da7cb9d..bcef48b 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 0dfd25e..737f811 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 a524a50..42a8a1f 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 9fd3ac4..5b7461b 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 0675b99..138bbba 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 fba7ec9..3f97cc8 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 6b4e216..c0dedd5 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 66bea20..93624bf 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 2c2cc32..f8632d8 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 9b13ffa..e64c429 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 807fb04..991f2f8 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 1a38b24..31c443f 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 8a3e527..b2f07c5 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 4689522..7dc2f66 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 f2ca4b2..d33be8f 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 0902f73..8046451 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 2fa4eac..1590ea9 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 e7390d6..496a07f 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 6c292cd..9036ec9 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 b9e9a05..98558c6 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 733b1ec..080f7ef 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 d3d5924..be8a469 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 378370c..0aeea36 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 8b1be54..362f65e 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 c52deb9..cbf7bf5 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 437d84d..7bc2966 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 9d1978b..ff7d7bb 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 42f3af1..11a8447 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 a8936ce..19f1d6b 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 d5fb985..b611aa3 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 44fe9f1..d2b99ed 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 15ec291..2a4a196 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 4a4da0f..4e0eaa2 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 06575da..1a04603 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 6a46ead..8127fe9 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 e91b789..0d01250 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 1feb71d..d6db678 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 9f7768c..e012491 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 d88b5ee..4b350af 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 4c67b37..d3ef0e5 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 edcc319..e5e7b40 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 564fa89..de99c8a 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 55d57bd..de9c2b8 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 0832f60..9114daf 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 0207a4f..d99b32a 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 0ecdcd7..52b605f 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 55bc883..407010d 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 35c0b46..5929640 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 e388d42..e8e25af 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 aac3e7c..80140fd 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 dd474d9..6428afb 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 0a5f732..1137d22 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.