[zeromq-dev] error: ISO C++ 1998 does not support 'long long'

Pieter Hintjens ph at imatix.com
Wed Oct 23 23:59:53 CEST 2013


Ah, ok...  I know what's happening. The 5 extra bytes are an identity frame :-)

I've made a pull request to fix this:

https://github.com/zeromq/libzmq/pull/720

Nice catch, this was breaking tests on some boxes, randomly... when
the response is one frame, it worked; when it was 2 frames it failed.


On Wed, Oct 23, 2013 at 10:36 PM, Peter Kleiweg <pkleiweg at xs4all.nl> wrote:
> Pieter Hintjens schreef op de 23e dag van de wijnmaand van het jaar 2013:
>
>> On Wed, Oct 23, 2013 at 6:49 PM, Peter Kleiweg <pkleiweg at xs4all.nl> wrote:
>>
>> > In test_stream_to_dealer, some fields are shifted 5 bytes to the
>> > right. If I change the test like below, the test passes.
>>
>> It's not related to use of libsodium in any way. Could be some code
>> that's not properly portable. Could you get a dump of the whole buffer
>> received?
>
> Another thing. This part of test_stream.cpp:
>
>     //  Second frame contains the rest of greeting along with
>     //  the Ready command
>     int bytes_read = 0;
>     while (bytes_read < 97) {
>         rc = zmq_recv (stream, buffer + bytes_read, 255 - bytes_read, 0);
>         fprintf(stderr, "Bytes read: %i\n", rc);  // I ADDED THIS
>         assert (rc >= 0);
>         bytes_read += rc;
>     }
>
> When the test succeeds, it reads 97 bytes in one go:
> Bytes read: 97
>
> When the test fails, it reads in three steps:
> Bytes read: 54
> Bytes read: 5
> Bytes read: 43
>
> The five bytes of the second read are the inserted wrong bytes.
>
>
>
>
> --
> Peter Kleiweg
> http://pkleiweg.home.xs4all.nl/
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



-- 
-
Pieter Hintjens
CEO of iMatix.com
Founder of ZeroMQ community
blog: http://hintjens.com



More information about the zeromq-dev mailing list