It's been a while since I was playing with my favorite platform. I am playing around with TiWi-SL Simple Web Server Demo (again).
What I just saw is that simple web server example can be refreshed from browser only NUM_HTTPD_CONNECTIONS times (7 by default)
httpd_state_t connection_states[NUM_HTTPD_CONNECTIONS]; are allocated new xtcp_connection_t is detected but it is not fried when in httpd_send xtcp_close(tcp_svr, conn); is called.
If I simply add httpd_free_state(conn); below xtcp_close(tcp_svr, conn); and now I can refresh more than HTTPD_CONNECTIONS times.
In original source httpd_free_state(conn); is only called on these events:
case XTCP_TIMED_OUT:
case XTCP_ABORTED:
case XTCP_CLOSED:
I guess I should get httpd_handle_event(... XTCP_CLOSED) after xtcp_close(tcp_svr, conn); is called but XTCP_CLOSED event is not sent on XTCP_CMD_CLOSE command.
I patched this in wifi_tiwisl_server.xc. Attaching if someone need it.
It seams to be working now but, is this right thing to do?
Possible bug in TiWi-SL Simple Web Server Demo?
-
- Member
- Posts: 10
- Joined: Wed Jan 08, 2014 5:36 pm
Possible bug in TiWi-SL Simple Web Server Demo?
You do not have the required permissions to view the files attached to this post.
-
- Member
- Posts: 10
- Joined: Wed Jan 08, 2014 5:36 pm
This is already fixed on https://github.com/xcore/sc_wifi.
Good job guys! Demo is now running much faster.
Good job guys! Demo is now running much faster.