I have a program that has 3 threads/tasks.
Starts the bearers and once started creates a HTTP Get request to a
server that sends a Hello request to a web server.
Thread one then also subscribes the hello request to a timer so that the
hello request is generated periodically.
This thread works and the request is sent to the webserver at startup
Subscribes to the UART 2 device reading a string from the UART.
When a complete line has been read, the string is copied into some space
allocated on the heap and the pointer to the dynamically allocated
string is posted onto a queue.
A new string event is then set.
Thread 2 then repeats waiting for a new string on the UART
Blocks on a new string event.
Pops the pointer to the dynamically allocated string off the queue and
then creates a new http get request.
The request is sent to the wip stack and the thread then blocks again
waiting for the new string event.
The callback events for the connection contexts are never called
resulting in the http get request never been processed and the server
never getting the get request with the string.
I have called the adl_initNet function as discribed in the Wip
Documenation under multiple threads in both thread 3 and thread 1
What is going wrong here and how do I solve it? I know that the bearer
on stack is up because the requests from Thread 1 make it through to the
server and they get a response.
I know that the function which creates the Get Requests for thread 3 is correct as
when called from thread 1 context the get request is processed correctly
and the request is processed by the webserver.