Hello,
the payload is a binary field delimited by length, not a
null-terminated C string, unless you added the null terminator
explicitly yourself. That's the first thing I would check.
Ian
On 12/12/2017 13:11, Vamsinag Gunti
wrote:
Hello,
I am using Eclipse Paho C in synchronous mode where I subscribe
to only one topic. When I publish a message for the
corresponding topic, the message I receive is correct only on
the first occurrence and is weird there after. This is the issue
I am facing:
- I publish "1234" from C client
- I receive "1234" on C client. No problem on the first go.
- I publish "1234"
- I receive "1234Client.c"
- I publish "hello"
- I receive "hellolient.c"
- I publish "1234"
- I receive "1234Client.c"
I do not see any overlap of messages but the message arrived
seems to be concatenated with some file's name. Am I supposed to
clear some buffer every-time I receive a message?
Thanks in advance
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
--
Ian Craggs
icraggs@xxxxxxxxxx IBM United Kingdom
Paho Project Lead; Committer on Mosquitto