When you change the actual size of the variable dataSize in the method tlp_put, tlp_put doesn´t pass successfully, even if the actual size is big enough. The return value is "TRDP_PARAM_ERR".
Reproducible e.g. with example sendHello.c when you change 24u to 25u in line 142
I cannot reproduce this in the current trunk. Which compile-time flags do use?
Issue is in the example. If you modify the size to 25 it is set to 25 in the publish. But in put it still formats the message to 24 characters. The buffer sizes must match otherwise it returns the TRDP_PARAM_ERR.
Thank you two for the quick answers.
@BerndLöhr: I am working on a windows machine, so WIN64 is active.
@JarekPawelczyk: I am just starting with TRDP so it might be possible that it´s just me, who doesn´t understand everything correctly. But at least I did several tests on that example.
The initial message is "Hello World", which is 11Bytes, but you define it´s size as 24Bytes. It seems a bit "strange" that the the size I define and the actual size of the variable vary. There are for sure reasons for that. For me that means that I simply set the variable outputBufferSize (dataSize) to the maximum size required and don´t change it afterwards, right? Or is there a reason to change the dataSize due to different message sizes?
On the other hand I am asking myself, why you need the dataSize in the put message, if I am not able to change it, anyway.
I am sorry for those "critical" questions.
In line 382 the buffer is overwritten. I printed the length of the buffer before the tlp_put.