summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2012-02-16Polling handle is a fixed type now.Martin Sustrik
Polling handle type was previously dependent on polling mechanism used. Now it is void* in all cases. This patch is a first step in the long way to separate the transports from the core library. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Message loss when a SUB socket disconnects fixedMartin Sustrik
When there are multiple subscribers connected to the same PUB socket and one of them disconnects, one of the orhers loses one message. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Redundant definition of blob_t removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Reduce memory usage of mtrie.Staffan Gimåker
Signed-off-by: Staffan Gimåker <staffan@spotify.com> Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Invalid iterator not usedMartin Sustrik
Iterator was checked although the item it was pointing to was erased. Now it never happens. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Improve checking for the invalid socketsMartin Sustrik
Till now the "valid" tag of the socket was removed only after the socket was properly deallocated by the reaper thread. That allowed user to access it while it was in the process of being deallocated. Now, the "valid" tag is removed as soon as zmq_close is called. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Obsolete launch_sibling function removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Race condition in zmq_term() fixedMartin Sustrik
It was possible to open a new socket while the log socket was being shut down. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16ZeroMQ compatibility header addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16File descriptor passed to in_event and out_eventMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Small error in a comment fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Subscription buffer in XSUB socket made elasticMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16TODO addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Allow to set up a source address for outgoing connections in zmq_connect()Sergey Matveychuk
Signed-off-by: Sergey Matveychuk <sem33@yandex-team.ru> Signed-off-by: Martin Sustrik <sustik@250bpm.com>
2012-02-16Fix bad combination of gcc3, -Werror and private destructorMichael Fox
2012-02-16The cause behind the segfault was next.node being deleted but count still ↵Staffan Gimåker
being non-zero. Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16Fixes to xs::xpub_t::xread_activatedMartin Sustrik
1. If the subscription is malformed, drop it silently. 2. Fixes a memory leak Signed-off-by: Staffan Gimåker <staffan@spotify.com> Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Prune redundant nodes in the trie.Staffan Gimåker
Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16Prune redundant nodes in the mtrie.Staffan Gimåker
Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16Updated connector open() doc strings.Ivo Danihelka
Signed-off-by: Ivo Danihelka <ivo@danihelka.net>
2012-02-16Patch from Mikko Koppanen for #LIBZMQ-301AJ Lewis
Add the '-Ae' flag and check for gethrtime() on HPUX Check if CLOCK_MONOTONIC defined before using it - if not, use gethrtime() if it's available, otherwise fall back to the old behavior. Signed-off-by: AJ Lewis <aj.lewis@quantum.com>
2012-02-16Stop polling for OUT immediately when no data in pipeMartin Sustrik
This patch is an optimisation. So far, when there were no data in the pipe, it was only next out_event that stopped the polling for POLLOUT. Now, the polling is canceled immediately. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Fix assertion in pgm_sender_t::plug() (LIBZMQ-303)Martin Lucina
Opening any PGM socket gives this assertion. The problem is in pgm_sender_t::plug() which is incorrectly testing the return value from session::write(). Signed-off-by: Martin Lucina <martin@lucina.net>
2012-02-16Fix pgm_receiver.cpp: zmq_assert (pending_bytes == 0) (LIBZMQ-205)Martin Lucina
This patch fixes the problem described in LIBZMQ-205. The assertion itself is probably caused by previously queued POLLIN events arriving after POLLIN has been disabled on the socket. The following additional bugs have been fixed as part of debugging this problem: - pgm_receiver_t does not flush messages written to the session in all cases which can lead to a stalled reader. Add calls to session->flush () in the appropriate places. - ensure to restart polling when a pending message is flushed in activate_in (). Signed-off-by: Martin Lucina <martin@lucina.net>
2012-02-16ZeroMQ renamed to CrossroadsMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16More logging infrastructureMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Remaining part of the logging infrastructure removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Logging functionality available for individual objectsMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Old logging infrastructure removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Monitor object addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Socket ID addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-12-17Dont wait for pending subscription commands on shutdownMartin Sustrik
When (X)SUB socket is being shut down there may be pending outbound subscription commands in the pipes. In such case we want to close the socket immediately instead of waiting for the commands to be sent. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-12-17Fix polling on XREP socketMartin Sustrik
When polling on XREP socket in incoming message part was prefetched, but not the identity of sender. The problem is fixed by this patch. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-12-16zmq_sendmsg and zmq_recvmsg checks for NULL message objectMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-12-15Added MSVC10 solution and project files for WindowsStuart Webster
These include configurations for both Win32 and x64 platforms. All project settings have been normalised in property sheets (the ".props" files under builds/msvc/properties) to simplify maintenance. Build artefacts are all generated in platform-specific subfolders of bin, lib and obj directories. Also enables the use of precompiled headers with MSVC10. This significantly reduces the time required to compile libzmq with Visual Studio on Windows. It should have no impact on other platforms. Signed-off-by: Stuart Webster <sw_webster@hotmail.com>
2011-12-15A synchronous connect() failure in ipc_connecter can result in AssertionMartin Lucina
failed: s == retired_fd (ipc_connecter.cpp:174), as reported in LIBZMQ-294. This patch fixes the bug, and also an identical problem in tcp_connecter which has not hit people since TCP connect() usually completes via the asynchronous code path (poll, out_event). Signed-off-by: Martin Lucina <martin@lucina.net>
2011-12-03This makes clock_t insensitive to the system clock being reset by NTP orMika Fischer
the sysadmin, which could previously cause long hangs for instance in zmq_poll. Signed-off-by: Mika Fischer <mika.fischer@zoopnet.de>
2011-11-22ENOTCONN on recv() on TCP socket is treated decently (issue 254)Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-15Bug in XREP and XREQ fixed (issue 280)Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-15Missing "defined" tokens addedMartin Sustrik
The missing tokens broke the build if you used -Werror -Wundef Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-14Bug concerining identity in XREQ socket fixed (issue 280)Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-13Couple of bugs in XREP handling of identities fixed.Martin Sustrik
wq: Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-10Hangup in signaler creation on Windows fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-09Get AIX 6.1 compiling again by making msg_t class explicitAJ Lewis
Older versions of gcc have problems with in-line forward declarations when there's a naming conflict with a global symbol. Signed-off-by: AJ Lewis <aj.lewis@quantum.com> Expand the original patch to all such forward declarations. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-08Uninitialised FSM state in REQ session fixed (issue 278)Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-06Add zmq_getmsgopt to the APIChuck Remes
The new function allows to retrieve options (flags) from zmq_msg_t. Signed-off-by: Chuck Remes <cremes@mac.com> Renamed from zmq_msg_flags to zmq_getmsgopt Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-05Bug in trie fixed (issue 277)Martin Sustrik
When there were both '0' and '255' subnodes in (mtrie) the removal of the node resulted in an infinite loop. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-05Use identities in inproc transportMartin Sustrik
Previous patches have missed the case when the identity should be sent from an inproc endpoint. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-04Fix getaddrinfo calls to work on OpenVMSBrett Cameron
Signed-off by: Brett Cameron <Brett.Cameron@hp.com>
2011-11-04MSVC build fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>