summaryrefslogtreecommitdiff
path: root/ACE/ace/DA_Strategy_Base.inl
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/DA_Strategy_Base.inl')
-rw-r--r--ACE/ace/DA_Strategy_Base.inl9
1 files changed, 8 insertions, 1 deletions
diff --git a/ACE/ace/DA_Strategy_Base.inl b/ACE/ace/DA_Strategy_Base.inl
index ad62a9f585a..be3e999e798 100644
--- a/ACE/ace/DA_Strategy_Base.inl
+++ b/ACE/ace/DA_Strategy_Base.inl
@@ -43,7 +43,14 @@ ACE_INLINE int
DA_Strategy_Base<AnnotationId>::add_annotation (AnnotationId id, int annotation)
{
int rc;
- rc = annotations_repo_.bind (id, annotation);
+ if (annotation > num_avail_threads_.value()) {
+ rc = -1;
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%p.\n"),
+ ACE_TEXT ("DA_Strategy_Base annotation may not exceed number of threads")));
+ } else {
+ rc = annotations_repo_.bind (id, annotation);
+ }
/*
ACE_DEBUG ((LM_DEBUG, "In add_annotation\n"));
HASH_ANNOTATIONS_CONST_ITER iter(annotations_repo_);