celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] abroekhuis commented on a change in pull request #245: Bugfix/data races
Date Tue, 09 Jun 2020 16:43:59 GMT

abroekhuis commented on a change in pull request #245:
URL: https://github.com/apache/celix/pull/245#discussion_r437158850



##########
File path: bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c
##########
@@ -1116,8 +1117,7 @@ char *pubsub_tcpHandler_get_interface_url(pubsub_tcpHandler_t *handle)
{
 //
 static inline
 int pubsub_tcpHandler_acceptHandler(pubsub_tcpHandler_t *handle, psa_tcp_connection_entry_t
*pendingConnectionEntry) {
-    celixThreadRwlock_writeLock(&handle->dbLock);
-    // new connection available
+    // new connection available, requires dbLock to be write locked

Review comment:
       But there is no lock here?

##########
File path: bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c
##########
@@ -150,6 +150,8 @@ pubsub_tcp_topic_receiver_t *pubsub_tcpTopicReceiver_create(celix_bundle_context
     pubsub_tcp_topic_receiver_t *receiver = calloc(1, sizeof(*receiver));
     receiver->ctx = ctx;
     receiver->logHelper = logHelper;
+
+    L_WARN("created receiver %p", receiver);

Review comment:
       Isn't L_INFO better here? Not sure what the general usage of WARN vs INFO is...




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



Mime
View raw message