From acd55d6d69a64b0ac4e59fc24b11da0a55621b74 Mon Sep 17 00:00:00 2001 From: Tom Collins Date: Wed, 24 Jun 2020 10:00:00 -0700 Subject: [PATCH] pinprocfw: call PRDelete() even if file doesn't parse Previously we'd fail to call PRDelete(), which may have been causing some of my problems with attempting to re-connect to the P-ROC. I assume PRDelete() closes out the connection in some way. --- utils/pinprocfw/pinprocfw.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/pinprocfw/pinprocfw.cpp b/utils/pinprocfw/pinprocfw.cpp index c062f40..a29d863 100644 --- a/utils/pinprocfw/pinprocfw.cpp +++ b/utils/pinprocfw/pinprocfw.cpp @@ -2136,9 +2136,6 @@ int processFile() endClock = clock(); fclose( in ); - // Destroy the P-ROC device handle: - PRDelete(proc); - proc = kPRHandleInvalid; return iErrorCode; } @@ -2306,7 +2303,10 @@ int main( int argc, char** argv ) break; default: break; - } + } + // Destroy the P-ROC device handle created by openPROC() + PRDelete(proc); + proc = kPRHandleInvalid; } } }