From commits-return-4666-archive-asf-public=cust-asf.ponee.io@celix.apache.org Thu Mar 1 21:07:30 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 094A418064D for ; Thu, 1 Mar 2018 21:07:29 +0100 (CET) Received: (qmail 59972 invoked by uid 500); 1 Mar 2018 20:07:29 -0000 Mailing-List: contact commits-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 commits@celix.apache.org Received: (qmail 59963 invoked by uid 99); 1 Mar 2018 20:07:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2018 20:07:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 79E5DE090C; Thu, 1 Mar 2018 20:07:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: erjanaltena@apache.org To: commits@celix.apache.org Message-Id: <8678b79c5ebf483c8a8b8fdd937a3467@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: celix git commit: pubsubEndpoint_equals returned wrong value -> reconnections failed Date: Thu, 1 Mar 2018 20:07:28 +0000 (UTC) Repository: celix Updated Branches: refs/heads/develop 058d79918 -> 04671006c pubsubEndpoint_equals returned wrong value -> reconnections failed Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/04671006 Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/04671006 Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/04671006 Branch: refs/heads/develop Commit: 04671006cae1b0e5d55147fe3426bce130a52545 Parents: 058d799 Author: Erjan Altena Authored: Thu Mar 1 21:06:54 2018 +0100 Committer: Erjan Altena Committed: Thu Mar 1 21:06:54 2018 +0100 ---------------------------------------------------------------------- pubsub/pubsub_spi/src/pubsub_endpoint.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/04671006/pubsub/pubsub_spi/src/pubsub_endpoint.c ---------------------------------------------------------------------- diff --git a/pubsub/pubsub_spi/src/pubsub_endpoint.c b/pubsub/pubsub_spi/src/pubsub_endpoint.c index 24123b7..2f480a8 100644 --- a/pubsub/pubsub_spi/src/pubsub_endpoint.c +++ b/pubsub/pubsub_spi/src/pubsub_endpoint.c @@ -314,7 +314,12 @@ void pubsubEndpoint_destroy(pubsub_endpoint_pt psEp){ bool pubsubEndpoint_equals(pubsub_endpoint_pt psEp1,pubsub_endpoint_pt psEp2){ - return strcmp(properties_get(psEp1->endpoint_props, PUBSUB_ENDPOINT_UUID),properties_get(psEp2->endpoint_props, PUBSUB_ENDPOINT_UUID)); + if (psEp1->endpoint_props && psEp2->endpoint_props) { + return !strcmp(properties_get(psEp1->endpoint_props, PUBSUB_ENDPOINT_UUID), + properties_get(psEp2->endpoint_props, PUBSUB_ENDPOINT_UUID)); + }else { + return false; + } } char * pubsubEndpoint_createScopeTopicKey(const char* scope, const char* topic) {