From 2224dd96cbf64f1184b3d74649e0a5679f398c59 Mon Sep 17 00:00:00 2001 From: "Andrew J. Kroll" Date: Mon, 4 Aug 2014 08:47:15 -0400 Subject: [PATCH] Check subclasses during enumeration --- cdcftdi.cpp | 2 +- cdcftdi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cdcftdi.cpp b/cdcftdi.cpp index 13ca683f..8f07b358 100644 --- a/cdcftdi.cpp +++ b/cdcftdi.cpp @@ -246,7 +246,7 @@ uint8_t FTDI::Release() { bNumEP = 1; qNextPollTime = 0; bPollEnable = false; - return 0; + return pAsync->OnRelease(this); } uint8_t FTDI::Poll() { diff --git a/cdcftdi.h b/cdcftdi.h index 692ec6b0..fbb7396d 100644 --- a/cdcftdi.h +++ b/cdcftdi.h @@ -79,6 +79,7 @@ class FTDI; class FTDIAsyncOper { public: virtual uint8_t OnInit(FTDI *pftdi) = 0; + virtual uint8_t OnRelease(FTDI *pftdi) = 0; };