nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #728: MINIFICPP-1147 Implemented.
Date Fri, 07 Feb 2020 09:38:06 GMT
bakaid commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376285952
 
 

 ##########
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##########
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const std::shared_ptr<core::ProcessConte
     }
   }
 
+  std::string mode;
+  context->getProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+    char systemDir[MAX_PATH];
+    if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
+      hMsobjsDll_ = LoadLibrary((systemDir + std::string("\\msobjs.dll")).c_str());
 
 Review comment:
   Having this in onSchedule and `FreeLibrary` in the destructor means that if onSchedule
is called multiple times (configuration reload, for example), the reference counter for this
DLL will be incremented multiple times and it won't be released when the object is finally
destructed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message