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



##########
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:
       Can't default_log_source->mask also be QD_LOG_UNDEFINED?
   I'd recommend changing the return on line 426 to
   return (mask == QD_LOG_UNDEFINED) ? false : !!(level & mask)




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