summaryrefslogtreecommitdiff
path: root/TAO/tao/EndpointPolicy
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2007-09-21 23:25:30 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2007-09-21 23:25:30 +0000
commitd2bc3a43162dbbfdf0195dc65af664641fce0383 (patch)
tree0c7a134dedf7457030acea76c182ef351750ed74 /TAO/tao/EndpointPolicy
parent0325b3b8bdfd882fd2dc6d75ed46108713afcd14 (diff)
downloadATCD-d2bc3a43162dbbfdf0195dc65af664641fce0383.tar.gz
ChangeLogTag:Fri Sep 22 00:21:47 UTC 2007 Ossama Othman <ossama_othman at symantec dot com>
Diffstat (limited to 'TAO/tao/EndpointPolicy')
-rw-r--r--TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.cpp b/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.cpp
index abb134e956e..a28f38e0580 100644
--- a/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.cpp
+++ b/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.cpp
@@ -113,24 +113,28 @@ TAO_Endpoint_Acceptor_Filter::fill_profile (const TAO::ObjectKey &object_key,
first_endpoint = false;
}
}
+
+ CORBA::ULong const ep_count = pfile->endpoint_count ();
+
// Remove the profiles that have no endpoints match the endpoints in
// endpoint policy.
- if (pfile->endpoint_count () == 0)
+ if (ep_count == 0
+ && mprofile.remove_profile (pfile) != -1)
{
+ --pfile_ndx; // Step back one. We've just shifted the profile list.
+
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT("(%P|%t) EndpointPolicy filter ")
ACE_TEXT("removing profile\n")));
- mprofile.remove_profile (pfile);
- --pfile_ndx; // step back one, we've just shifted the profile list.
}
- else
+ else if (ep_count != 0)
{
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT("(%P|%t) EndpointPolicy filter ")
ACE_TEXT("profile retained with %d endpoints\n"),
- pfile->endpoint_count()));
+ ep_count));
}
}