| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* Move functions to private as appropriate
* Reorder functions to match declaration order
* Declare arguments as const when appropriate
* Rename to getActionHandler() to match previous method name
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I7d3b5bbb07c218c6c2d6277a1f19d8a0299bd6e6
|
|
|
|
|
|
|
|
| |
The getPath call is only used once. Getting rid of it makes it easier to
understand.
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: Ifc8859f5fc68bb594003a6db7f7e80b1c1dfed28
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplify code and address comments from
http://gerrit.openbmc-project.xyz/c/openbmc/phosphor-ipmi-blobs/+/27399:
* Use C++17 syntax of intializers in conditionals to simplify code.
* Move getActionHandle() implementation to .cpp
* return false explicitly
Tested:
Unit tests still pass.
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I08a78125206f284d8c748822912e11828fb39968
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using private methods to change data, directly operate on
it. Currently no test depends on these methods.
There is also a minor bug fix: the previous code will not increment or
decrement the open session count if the blobId is an empty string,
however there is no check on the manager side. If empty blobIds are
disallowed they should be checked earlier.
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I8d97e098bed2d5c27a204a86ed688d0d9a98f0a2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the caller opens sessions but doesn't close them, either
intentionally or unintentionally, session IDs will leak. Once the
maximum number of sessions are reached, no new session can be opened.
Implement a cleanup procedure to automatically remove stale sessions. If
a session hasn't seen activity for a while, call the expire()
functions on the handler, and remove the session from tracking table.
For handlers that haven't implemented the expire() call this change will
be a no-op.
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I895ae19b4003d2d6f7a0b2e73370fe5aa664adee
|
|
|
|
|
|
|
|
|
| |
Add a timestamp member in SessionStat to capture when the session
sees activity last, and update it with every action. The timestamp
will be used to check when the session should expire.
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: Ic781d54173099bff76b3c37dd296521680fe7986
|
|
|
|
|
|
|
|
| |
Use a single method to fetch the handler, if it can be found using
session ID.
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I648cbc48ebfae479f63d34e8f2465d2c8cbe9d64
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because this structure is not anything special, simply use the cpp
idiomatic way of referencing the object.
Consistently, structures that are packed still have "struct" used in
declarations. However, this distinction is only clear through its usage
and nothing in the language. Perhaps a better approach would be
notational naming struct PackedXYZ {};. However, that can get out of
control quickly.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I3b7e48e4b6687ef2e15e9d07c0eeba96eb5d2552
|
|
|
|
|
|
|
|
|
| |
phosphor-host-ipmid now exposes a library along with headers for
interfacing with the ipmi daemon. Compile and link against the new
library.
Change-Id: I663e6607f711bc8bae0a2127db524868f6d4cc32
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The host-client cannot try to read back more than this number of bytes
without hitting a memory overflow in phosphor-host-ipmid. The method we
can call to dynamically receive that number isn't currently linking out
of the userlayer library.
Note: Once the configure_ac can find and provide the userlayer library
from phosphor-host-ipmid, we can remove the hard-coded 64 and 0xe.
Change-Id: I08f6bb59ce44279f76a494dccaa477ae75d532c4
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Stop installing the manager header as it is no longer meant to be
exported, but rather used only internally within this repository.
Change-Id: I2ab21a31fd745e1b3e36fc39ffea5e26d373ff51
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
The blobs and manager header will be used by handlers once we've
transitioned to dynamic loading.
Change-Id: Ieae8fcfe383007731cb4f8b2619612c3bfa47f50
Signed-off-by: Patrick Venture <venture@google.com>
|
|
This implements a majority of the OEM IPMI BLOBS protocol. The only
piece missing from this is the timed expiration of sessions.
Change-Id: I82c9d17b625c94fc3340edcfabbbf1ffeb5ad7ac
Signed-off-by: Patrick Venture <venture@google.com>
|