From f5c049f2f81e296448b33d1a25b4a00b55b314a3 Mon Sep 17 00:00:00 2001 From: Andrew Duggan Date: Tue, 17 May 2016 13:30:06 -0700 Subject: Make sure the RMIDevice's members are cleared on close --- rmidevice/rmidevice.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rmidevice/rmidevice.cpp') diff --git a/rmidevice/rmidevice.cpp b/rmidevice/rmidevice.cpp index 6926304..668301c 100644 --- a/rmidevice/rmidevice.cpp +++ b/rmidevice/rmidevice.cpp @@ -206,6 +206,15 @@ int RMIDevice::QueryBasicProperties() return 0; } +void RMIDevice::Close() +{ + m_functionList.clear(); + m_bCancel = false; + m_bytesPerReadRequest = 0; + m_page = -1; + m_deviceType = RMI_DEVICE_TYPE_ANY; +} + void RMIDevice::PrintProperties() { fprintf(stdout, "manufacturerID:\t\t%d\n", m_manufacturerID); -- cgit v1.2.3