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 <[email protected]> Authored: Thu Mar 1 21:06:54 2018 +0100 Committer: Erjan Altena <[email protected]> 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) {
