diff options
author | Steven McCoy <steven.mccoy@miru.hk> | 2010-09-28 16:58:51 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-09-30 09:11:19 +0200 |
commit | 96d85b20982926e60d5065cba3203971c9eeed63 (patch) | |
tree | c2d29faea3ec82b836b47e9d73de8f3d0994591e /src/pgm_receiver.hpp | |
parent | 00cd7d49c7f2b532b2349581b82577bc714f9bf8 (diff) |
* Add assertions to check for OpenPGM calls with invalid parameters.
* Assertion to check that pgm_getaddrinfo is actually returning something.
* Missing pgm_connect call.
* Typo on TOS causing immediate abort.
* Placeholder calls for timeouts whilst continuing spin loop functionality.
* OpenPGM v5 now supports reference counting so remove init checks.
* Duplicate UDP unicast port setting, requires one unicast and one multicast.
* Incorrectly set socket rcvbuf size with sndbuf.
* Replace std::lexicographical_compare of TSI's with long word integer comparisons.
* pgm_socket_t::receive returns -1 on no data.
Diffstat (limited to 'src/pgm_receiver.hpp')
-rw-r--r-- | src/pgm_receiver.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp index bbdb31d..f32d37e 100644 --- a/src/pgm_receiver.hpp +++ b/src/pgm_receiver.hpp @@ -73,15 +73,13 @@ namespace zmq struct tsi_comp { - inline bool operator () (const pgm_tsi_t <si, + bool operator () (const pgm_tsi_t <si, const pgm_tsi_t &rtsi) const { - if (ltsi.sport < rtsi.sport) - return true; - - return (std::lexicographical_compare (ltsi.gsi.identifier, - ltsi.gsi.identifier + 6, - rtsi.gsi.identifier, rtsi.gsi.identifier + 6)); + uint32_t ll[2], rl[2]; + memcpy (ll, <si, sizeof (ll)); + memcpy (rl, &rtsi, sizeof (rl)); + return (ll[0] < rl[0]) || (ll[0] == rl[0] && ll[1] < rl[1]); } }; |