0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 00:32:34 +08:00

954 Commits

Author SHA1 Message Date
Martin Sustrik
f77c8ca47f Merge branch 'maint'
* maint:
  Couple of patches for AIX build
2010-11-13 18:16:13 +01:00
Martin Sustrik
ffcb0baa73 Couple of patches for AIX build
- RAND_bytes function resides in crypto library
- pollfd on AIX used 'reqevents' instead of events and 'retnevents'
  instead of 'revents'

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-13 18:08:18 +01:00
Chia-liang Kao
a2500ae348 Fix a bug that zmq_poll's select backend spins when timeout=-1, due to
ptimeout not properly recalculated after first pass.

Signed-off-by: Chia-liang Kao <clkao@clkao.org>
2010-11-12 19:16:00 +01:00
Martin Sustrik
8abe67357a Merge branch 'maint'
* maint:
  Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal

Conflicts:
	src/socket_base.cpp
2010-11-12 14:47:26 +01:00
Marc Rossi
f7123de943 Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal
Added block boolean var to second process_commands() invocation for blocking sockets
instead of always using true.  This prevents the process_commands() call from hanging
when a message is received with an empty queue after the call to xrecv() but
prior to the initial call to process_commands() invoked when ++ticks == inbound_poll_rate.

Signed-off-by: Marc Rossi <mrossi19@gmail.com>
2010-11-12 14:38:25 +01:00
Martin Sustrik
c0217027cc Coding style cleanup in mailbox.cpp
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-06 08:02:14 +01:00
Martin Sustrik
9da84a5239 signaler renamed to mailbox
For historical reasons queue to transfer commands between
threads was called 'signaler'. Given that it was used to
pass commands rather than signals it was renamed to 'mailbox',
see Erlang mailboxes.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-05 17:39:51 +01:00
Martin Sustrik
9cfdb441f4 slots renamed to tids
Threads were so far identified by integers called 'slots'.
This patch renames them to more comprehensible 'tid's (thread IDs).

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-05 16:38:52 +01:00
Martin Sustrik
623a9c9f1b Jacob Rideout added to the AUTGORS file.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-04 21:23:07 +01:00
Jacob Rideout
0ada4f8e30 Fix documentation typos
Signed-off-by: Jacob Rideout <jacob.rideout@returnpath.net>
2010-11-04 21:21:01 +01:00
Martin Lucina
1b39bcd883 Automatically resize signalling socket buffer if full
If the socketpair used by signaler_t fills up, this can lead to deadlock.
This patch provides partial resolution by attempting to resize SO_SNDBUF on
the writer side, and if that fails we shall at least assert rather than
hang.

I've also refactored the signaler_t code to make the platform-dependent
parts clearer and have tested both the MSG_DONTWAIT and standard POSIX path
in recv.

The Win32 implementation currently does not implement resizing as I'm not
convinced that it's safe, but it will also assert like other platforms if
signaler_t::send() cannot succeed.

The OpenVMS implementation has been carried forward but is untested.

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-11-04 17:54:47 +01:00
Martin Sustrik
756f7df8c8 Previous FD_STSIZE patch reverted.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-04 16:11:04 +01:00
Martin Sustrik
2246689c8f FD_SETSIZE for internal polling defaults to 1024
If, when compiling 0MQ you don't set FD_SETSIZE,
it defaults to 1024 rather than to 64.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-04 13:12:40 +01:00
Martin Sustrik
b90e621329 minor typo fixed
Devpoll polling mechanism used ZMQ_HAVE_SOLRIS instead of
ZMQ_HAVE_SOLARIS in one case. Fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-04 10:01:58 +01:00
Martin Sustrik
d4a41067d3 HP-UX has no OPEN_MAX defined
devpoll_t used this constant to determine how many events to
retrieve from the poller in one go. The implementation was
changed not to depend on this constant.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-02 14:27:24 +01:00
Martin Sustrik
de93f6359f crypto library is needed on HP-UX to generate UUIDs
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-02 13:30:20 +01:00
Martin Sustrik
dbcd382524 Merge branch 'maint'
* maint:
  Add INSTALL to Git, thus making it a normal file
2010-11-01 14:13:36 +01:00
Martin Lucina
eb83678b2b Add INSTALL to Git, thus making it a normal file
INSTALL gets added in somewhat magically by automake, or not. Adding it into
Git ensures it's always included in the distribution.

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-11-01 14:12:33 +01:00
Mikael Helbo Kjaer
0ad71f88fe select now uses Erase-Remove idiom for retired fds
Signed-off-by: Mikael Helbo Kjaer <mhk@designtech.dk>
2010-11-01 12:54:58 +01:00
Martin Sustrik
085b709021 Documentation for zmq_close and zmq_term fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30 18:17:53 +02:00
Martin Sustrik
3d8eb071a2 Coding style fixed for pgm_socket
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30 16:17:08 +02:00
Martin Sustrik
b358df9fff Name of "GNU Lesser Public License" corrected.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30 15:08:28 +02:00
Martin Sustrik
3d01b929fe Peter Bourgon added to the AUTHORS file
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-29 08:19:07 +02:00
Peter Bourgon
9384faf7e5 Add function to zmq::error_t to access errnum
Signed-off-by: Peter Bourgon <peter.bourgon@gmail.com>
2010-10-29 08:16:59 +02:00
Martin Sustrik
dace2473f1 Burak Arslan added to the AUTHORS file
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-28 08:44:53 +02:00
Burak Arslan
3eb935ef6e switch to c++-specific headers
Signed-off-by: Burak Arslan <burak-github@arskom.com.tr>
2010-10-28 08:41:28 +02:00
Dhammika Pathirana
9a1d4df0fd fix typo, destroy new engine
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-10-27 09:37:32 +02:00
Dhammika Pathirana
465da7b17e drop connection requests with duplicate peer identity
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-10-26 16:02:47 +02:00
Martin Sustrik
401986e6bb Build with MSVC2005 fixed
To use __rdtsc() function MSVC2005 requires including intrin.h

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-26 15:35:56 +02:00
Steven McCoy
e1debf15bb Update to OpenPGM 5.0.91.
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2010-10-26 14:24:07 +02:00
Martin Sustrik
11af0fcc54 Merge branch 'maint'
* maint:
  Fixes build on Linux using Sun Studio compiler
2010-10-23 22:12:47 +02:00
Mikko Koppanen
8ef53c0dc6 Fixes build on Linux using Sun Studio compiler
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2010-10-23 22:09:13 +02:00
Dhammika Pathirana
71bef330fc handle decoding malformed messages
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-10-23 20:59:54 +02:00
Steven McCoy
8d6979922e Changes for MSVC OpenPGM build.
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2010-10-23 14:35:02 +02:00
Martin Sustrik
da59f8dd7a Merge branch 'maint'
* maint:
  SunStudio fixed.
2010-10-23 13:51:12 +02:00
Martin Sustrik
21b0c0b4f7 SunStudio fixed.
With SunStudio's implementation of STL basic_string constructor
doesn't accept NULL as a parameter even though size of string
is set to zero. Fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-23 13:49:13 +02:00
Martin Sustrik
e73c96ba30 Minor comment improvement.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-18 09:11:36 +02:00
Martin Sustrik
0c86f90280 Minor typo fixed in zmq_getsockopt(3) man page.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-17 10:26:06 +02:00
Martin Sustrik
a780833683 ZMQ_BACKLOG socket option added.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-17 10:23:58 +02:00
Martin Sustrik
e8e2944f45 ZMQ_RECONNECT_IVL socket options added.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-17 09:54:12 +02:00
Martin Sustrik
8b8837688a Couple of bugs in zmq_poll fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 17:56:25 +02:00
Martin Sustrik
72b15a6dae Implementation of zmq_strerror moved from zmq.cpp to err.cpp
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 16:05:34 +02:00
Martin Sustrik
61d38fbeed Bug in low precision clock fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 14:48:06 +02:00
Martin Sustrik
0a03e86e95 ZMQ_LINGER socket option added.
1. ZMQ_LINGER option can be set/get
    2. options are part of own_t base class rather than being declared
       separately by individual objects
    3. Linger option is propagated with "term" command so that the
       newest value of it is used rather than the stored old one.
    4. Session sets the linger timer if needed and terminates
       as soon as it expires.
    5. Corresponding documentation updated.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 10:53:29 +02:00
Toralf Wittner
a1474e3057 Cancel tx_timer_id in pgm_sender_t::out_event().
Signed-off-by: Toralf Wittner <toralf.wittner@gmail.com>
2010-10-16 08:27:57 +02:00
Martin Sustrik
733c6780c5 Minor code clean-up to keep clang compiler happy.
"warning: extra ';' inside a struct or union [-pedantic]"

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 01:22:18 +02:00
Mikko Koppanen
b95f11aa0a Don't set pedantic to yes if using ICC
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2010-10-16 01:05:15 +02:00
Martin Sustrik
48b0a901b8 Obsolete compile-time option removed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 00:53:50 +02:00
Martin Sustrik
ae5a3c8a99 Merge branch 'maint'
* maint:
  Version number increased.

Conflicts:
	include/zmq.h

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 00:49:01 +02:00
Martin Sustrik
710615cdab Version number increased.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 00:47:31 +02:00