1. 27 Aug, 2012 6 commits
  2. 26 Aug, 2012 6 commits
  3. 25 Aug, 2012 1 commit
  4. 24 Aug, 2012 5 commits
    • Arthur O'Dwyer's avatar
      Fix monitor_event() to work at all. · 7fadd708
      Arthur O'Dwyer authored
      There are three versions of monitor_event(), all taking
      variadic arguments. The original code just has the first one
      creating a va_list and passing that va_list variadically to
      the second one... which creates a new va_list and passes it
      variadically to the third one... and of course everything
      blows up when we try to pull a non-va_list argument off the
      stack.
      
      The correct approach matches the C standard library's use
      of printf/vprintf, scanf/vscanf, and so on. Once you make
      a va_list, you must pass it only to functions which expect
      a va_list parameter.
      7fadd708
    • Arthur O'Dwyer's avatar
      Add a missing null-check, turning a segfault into an assertion. · 537a8027
      Arthur O'Dwyer authored
      Static analysis says:
      src\tcp_address.cpp(297): error V595: The 'res' pointer was utilized before it was verified against nullptr. Check lines: 297, 301.
      src\tcp_address.cpp(603): error V106: Implicit type conversion third argument 'full_bytes' of function 'memcmp' to memsize type.
      src\tcp_address.cpp(603): error V526: The 'memcmp' function returns 0 if corresponding buffers are equal. Consider examining the condition for mistakes.
      
      In fact the use of "memcmp" is correct, but the enclosing "if" isn't
      necessary, and the compiler is happier if "full_bytes" is a size_t.
      537a8027
    • Arthur O'Dwyer's avatar
      Fix a bug in pipe_t::flush(). · 6347d392
      Arthur O'Dwyer authored
      Static analysis says:
      src\pipe.cpp(193): error V547: Expression is always false. Probably the '||' operator should be used here.
      
      If flush() is called on a pipe whose state was
      "terminated" or "double_terminated", the programmer's
      intent was to return immediately. But in fact the
      two conditions can never be true simultaneously, so
      the early return never happens, and we may try to flush
      a terminated pipe anyway.
      6347d392
    • Arthur O'Dwyer's avatar
      Silence a compiler warning. · 0886b7a2
      Arthur O'Dwyer authored
      Static analysis says:
      src\fd.hpp(38): error V103: Implicit type conversion from memsize to 32-bit type.
      
      Adding the explicit cast should shut it up.
      0886b7a2
    • Arthur O'Dwyer's avatar
      The "count_" out-parameter is doubled instead of unchanged. · a48751b3
      Arthur O'Dwyer authored
      Static analysis says:
      src\zmq.cpp(489): error V220: Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize. The value being casted: '* count_'.
      src\zmq.cpp(510): error V127: An overflow of the 32-bit 'nread' variable is possible inside a long cycle which utilizes a memsize-type loop counter.
      
      I've silenced the warning on line 489 and ignored the other.
      But also, it looks to me like there's a serious bug here: The
      out-parameter "count_" is never set to zero before we start
      incrementing it. So its final value will always be between
      1 and 2 times its initial value. The fix seems obvious.
      a48751b3
  5. 23 Aug, 2012 4 commits
    • Ian Barber's avatar
      Merge pull request #410 from Quuxplusone/LIBZMQ-414 · d588dbf2
      Ian Barber authored
      [LIBZMQ-414] Fix an error in the inline assembly for Thumb2.
      d588dbf2
    • Ian Barber's avatar
      Merge pull request #411 from Quuxplusone/fix-test_monitor-bug · 033e311d
      Ian Barber authored
      Fix a bug reported on the mailing list.
      033e311d
    • Arthur O'Dwyer's avatar
      Fix a bug reported on the mailing list. · f718d2be
      Arthur O'Dwyer authored
      Both memcmp and strcmp return zero on equal, nonzero on nonequal;
      so all of these tests were backwards.
      
      The original committer fixed the failure by comparing 22 bytes instead
      of the correct 21, so that the assertions would trigger only if the
      22nd byte happened to match exactly --- which was rare.
      
      The correct fix is to compare the right number of bytes with the
      right sense.  (I think all of the ".addr" fields are null-terminated,
      in which case it's more appropriate to use strcmp throughout.)
      f718d2be
    • Arthur O'Dwyer's avatar
      Fix an error in the inline assembly for Thumb2. · 28c9255d
      Arthur O'Dwyer authored
      Notice that ZeroMQ has never been compiled for Thumb2 before,
      and I personally don't make any guarantees that it will actually
      behave correctly once compiled. But after this patch, it is at
      least *possible* to compile it for Thumb2.
      
      (Thumb2 is the target for most iOS devices.)
      28c9255d
  6. 12 Aug, 2012 1 commit
  7. 11 Aug, 2012 1 commit
  8. 05 Aug, 2012 2 commits
  9. 04 Aug, 2012 3 commits
  10. 31 Jul, 2012 2 commits
    • Ian Barber's avatar
      Merge pull request #406 from hurtonm/master · 1f229547
      Ian Barber authored
      Fix issue #406
      1f229547
    • Martin Hurton's avatar
      Fix issue #406 · 9fab9937
      Martin Hurton authored
      When a peer reconnects, the router socket receives an identity
      message containing this peer id. When this happens, the current
      implementation crashes.
      
      This patch makes a router socket to silently ignore all identity
      messages coming from reconnected peers.
      9fab9937
  11. 29 Jul, 2012 1 commit
  12. 28 Jul, 2012 1 commit
  13. 26 Jul, 2012 3 commits
  14. 24 Jul, 2012 1 commit
  15. 18 Jul, 2012 1 commit
  16. 17 Jul, 2012 1 commit
  17. 13 Jul, 2012 1 commit