For quite some time I have been investigating a weird bug in encoding ElementList with UPA C -- being wrapped, ElementList encoding routines do not finalize encoding of the container.
I was able to narrow the problem to a small code snippet, please see the attached source file: one can see, that every encoding routine call returned 0 or positive value, end the buffer is populated with the encoded value(s), but actual finalization hasn’t happened, therefore during decoding ElementList comes out empty. However, if comment out line #67 and uncomment line #68, the ElementList decoded completely and successfully.
It’s worth to mention:
- the wrap utility works for all other UPA functions, including transport and messages routines. For example, the same implementation of the Encoder class for FieldList works perfectly;
- in the original project/code, even calling rsslEncodeElementListComplete natively(unwrapped) does not solve the problem.
I would really appreciate any assistance in the investigation, because I am out of the ideas.
Thank you in advance.