Skip to content

Commit

Permalink
Avoid exporting imported services when handling endpoint name reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
tcalmant committed Apr 20, 2015
1 parent 98a5422 commit 39161a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pelix/remote/dispatcher.py
Expand Up @@ -8,7 +8,7 @@
:author: Thomas Calmant
:copyright: Copyright 2015, isandlaTech
:license: Apache License 2.0
:version: 0.6.0
:version: 0.6.1
:status: Beta
..
Expand Down Expand Up @@ -165,7 +165,8 @@ def _check_name_reuse(self, name):
:param name: The endpoint name to reuse
"""
ldap_filter = "({0}={1})".format(pelix.remote.PROP_ENDPOINT_NAME, name)
ldap_filter = "(&({0}={1})(!({2}=*)))".format(
pelix.remote.PROP_ENDPOINT_NAME, name, pelix.remote.PROP_IMPORTED)
svc_ref = self._context.get_service_reference(None, ldap_filter)
if svc_ref is not None:
# A service wants to be exported with the given endpoint name
Expand Down

0 comments on commit 39161a8

Please sign in to comment.