mgoulish commented on a change in pull request #1376:
URL: https://github.com/apache/qpid-dispatch/pull/1376#discussion_r728342081



##########
File path: src/log.c
##########
@@ -419,7 +419,10 @@ static void qd_log_source_free(qd_log_source_t *src) {
 
 bool qd_log_enabled(qd_log_source_t *source, qd_log_level_t level) {
     if (!source) return false;
-    int mask = source->mask == -1 ? default_log_source->mask : source->mask;
+    uint32_t mask = sys_atomic_get(&source->mask);
+    if (mask == QD_LOG_UNDEFINED) {
+        mask = sys_atomic_get(&default_log_source->mask);
+    }
     return level & mask;

Review comment:
       First change worked fine, but second change -- to line 426 -- caused 3 
new test failures.
   Your concern is what happens if the mask is still UNDEFINED, right? 
   In which case     level & mask == level.
   I will look into the failures.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to