Closed akemery closed 3 years ago
Hello Emery,
Arf, you're not on the most recent commit. This problem has already been fixed in d061dfaf, and you didn't work from the last version (which explains your merge conflict). You should rebase your branch on Master when a new commit is pushed and fix locally any potential conflict before sending a pull request.
There might be other bugs in the code; I expect to hunt them all in August, in the meantime it does not appear safe for you to experiment with the API. You will probably encounter many more other issues. Some of them might be related to some code logic that may change in the future (e.g., detecting a stream id based on AEAD tag mismatch will change).
In tcpls_receive, when the data are received from a stream, a stream_ptr list related to rcv_socket is got from available stream list using the function get_stream_from_socket, there is a pointer error in that function. Use list_t streams_ptr = new_list(sizeof(tcpls_stream_t ), 3); rather than list_t streams_ptr = new_list(sizeof(tcpls_stream_t ), 3); Also when the stream is retrieved in tcpls_receive() use
tcpls_stream_t stream = list_get(streams_ptr, i); rather than tcpls_stream_t **stream = list_get(streams_ptr, i);
That remove memory error when trying to send data using stream.