New380 / cubesat-space-protocol

Automatically exported from code.google.com/p/cubesat-space-protocol
0 stars 0 forks source link

Get rid of conn->rxmalloc! #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The only device driver which uses the conn->rxmalloc field is the
CSP_IF_CAN driver. This driver uses the routing system to identify incoming
packets and see to which connection they belong. In order to simplify the
router, the connection concept has been removed from the routing task. (See
issue 9). Therefore, the field conn->rxmalloc is no longer valid to use by
the driver. In fact, no driver should ever use any fields from the
connection handle!

The solution is to rewrite the can driver so that it has a local table
listing current buffer allocations, and a simple search mechanism to locate
the correct buffer. Only when a frame is fully received should the
csp_new_packet function be called!

This will also remove the call to csp_route() from the driver, and thereby
facilitate the implementation of a thread safe version of this call. (see
issue 5)

Original issue reported on code.google.com by johan.de...@gmail.com on 6 May 2010 at 8:31

GoogleCodeExporter commented 9 years ago
Removed conn->rxmalloc from csp.h and csp_conn.c

now the only reference remaining is in csp_if_can.c - which need to be fixed:

Original comment by johan.de...@gmail.com on 6 May 2010 at 8:56