commit | 47d560652f1ae28519323df61d69ec63bbf1a846 | [log] [tgz] |
---|---|---|
author | Davide Guerri <davide.guerri@gmail.com> | Wed Oct 12 03:31:19 2016 -0700 |
committer | Philip Tricca <philip.b.tricca@intel.com> | Thu Oct 13 18:00:09 2016 -0700 |
tree | c43d66e6df3ad2011556d343cc10c1dd8361bc1f | |
parent | 8e25d0cbb287d30c93b2b77e99bc761dc67e31a9 [diff] |
Fix #286 resource manager eats up more that 100% CPU if client disconnects without freeing resources As it turns out, the resource manager doesn't close the socket when it receives 0 from recv. From man recv: Return Value These calls return the number of bytes received, or -1 if an error occurred. The return value will be 0 when the peer has performed an orderly shutdown. Instead of detecting that the client has closed the connection, resoucemgr keeps calling recv in an infinite for loop (see common/sockets.cpp) Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
This stack consists of the following layers from top to bottom:
Since the FAPI and ESAPI haven't been implemented yet, this repository only contains the SAPI and layers below it, plus a test application for exercising the SAPI.
The test application, tpmclient, tests many of the commands against the TPM 2.0 simulator. The tpmclient application can be altered and used as a sandbox to test and develop any TPM 2.0 command sequences, and provides an excellent development and learning vehicle.
TPM 2.0 specifications can be found at Trusted Computing Group.