From dev-return-1806-apmail-celix-dev-archive=celix.apache.org@celix.apache.org Tue Mar 31 10:12:24 2020 Return-Path: X-Original-To: apmail-celix-dev-archive@www.apache.org Delivered-To: apmail-celix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id C625B19F0D for ; Tue, 31 Mar 2020 10:12:23 +0000 (UTC) Received: (qmail 38884 invoked by uid 500); 31 Mar 2020 10:12:23 -0000 Delivered-To: apmail-celix-dev-archive@celix.apache.org Received: (qmail 38860 invoked by uid 500); 31 Mar 2020 10:12:23 -0000 Mailing-List: contact dev-help@celix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@celix.apache.org Delivered-To: mailing list dev@celix.apache.org Received: (qmail 38846 invoked by uid 99); 31 Mar 2020 10:12:23 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2020 10:12:23 +0000 From: GitBox To: dev@celix.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bcelix=5D_Oipo_commented_on_a_change_in_pull_req?= =?utf-8?q?uest_=23181=3A_Updated_ZMQ_implementation_to_use_NULL_if_scope_?= =?utf-8?q?is_not_set=2E_Only_when=E2=80=A6?= Message-ID: <158564954312.17495.11852536647423733492.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Tue, 31 Mar 2020 10:12:23 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Oipo commented on a change in pull request #181: Updated ZMQ implementation to use NULL if scope is not set. Only when… URL: https://github.com/apache/celix/pull/181#discussion_r400768460 ########## File path: bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c ########## @@ -667,13 +667,17 @@ static celix_status_t pubsub_zmqAdmin_connectEndpointToReceiver(pubsub_zmq_admin const char *eSerializer = celix_properties_get(endpoint, PUBSUB_ENDPOINT_SERIALIZER, NULL); const char *eProtocol = celix_properties_get(endpoint, PUBSUB_ENDPOINT_PROTOCOL, NULL); - if (scope != NULL && topic != NULL && serializer != NULL && protocol != NULL - && eScope != NULL && eTopic != NULL && eSerializer != NULL && eProtocol != NULL - && strncmp(eScope, scope, 1024*1024) == 0 + if (topic != NULL && serializer != NULL && protocol != NULL + && eTopic != NULL && eSerializer != NULL && eProtocol != NULL && strncmp(eTopic, topic, 1024*1024) == 0 && strncmp(eSerializer, serializer, 1024*1024) == 0 && strncmp(eProtocol, protocol, 1024*1024) == 0) { - pubsub_zmqTopicReceiver_connectTo(receiver, url); + // Scope is not required + if (scope == NULL && eScope == NULL) { + pubsub_zmqTopicReceiver_connectTo(receiver, url); + } else if (scope != NULL && eScope != NULL && strncmp(scope, eScope, 1024*1024) == 0) { + pubsub_zmqTopicReceiver_connectTo(receiver, url); + } Review comment: Else warning? ---------------------------------------------------------------- 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