Separated waiting for message from acting on message.

Necessary refactoring of parameter types propagated through source.
This commit is contained in:
2019-08-21 15:55:33 +01:00
parent 2f8e417d00
commit 2987cbe26e
12 changed files with 51 additions and 45 deletions

View File

@@ -21,10 +21,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
using namespace std;
U2F_Ping_CMD::U2F_Ping_CMD(const shared_ptr<U2FMessage> uMsg)
: nonce{ uMsg->data }
U2F_Ping_CMD::U2F_Ping_CMD(const U2FMessage& uMsg)
: nonce{ uMsg.data }
{
if (uMsg->cmd != U2FHID_PING)
if (uMsg.cmd != U2FHID_PING)
throw runtime_error{ "Failed to get U2F ping message" };
}