diff options
author | gokhale <gokhale@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-08-07 15:00:36 +0000 |
---|---|---|
committer | gokhale <gokhale@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-08-07 15:00:36 +0000 |
commit | c36d238586885862b35adf3e5cd63e06195751a2 (patch) | |
tree | c03939d719bae9a2567aed2c354e86373c71768d /TAO | |
parent | e273d66c61e4149c778e8ef7a0228bb8366c9bfb (diff) | |
download | ATCD-c36d238586885862b35adf3e5cd63e06195751a2.tar.gz |
An ACE_ASSERT line in factories.cpp and improper casting to char* in
objtable.cpp is taken care of.
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/tao/factories.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/objtable.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/TAO/tao/factories.cpp b/TAO/tao/factories.cpp index 94c9d99708a..67e936d96c1 100644 --- a/TAO/tao/factories.cpp +++ b/TAO/tao/factories.cpp @@ -93,7 +93,7 @@ TAO_Server_Factory::object_lookup_strategy (void) case TAO_OA_Parameters::TAO_USER_DEFINED: // it is assumed that the user would have used the hooks to supply a // user-defined instance of the object table - ACE_ASSERT (this->objtable_ != 0); + // ACE_ASSERT (this->objtable_ != 0); this->objtable_ = p->userdef_lookup_strategy (); break; case TAO_OA_Parameters::TAO_ACTIVE_DEMUX: diff --git a/TAO/tao/objtable.cpp b/TAO/tao/objtable.cpp index ea618875de4..695c8988ab1 100644 --- a/TAO/tao/objtable.cpp +++ b/TAO/tao/objtable.cpp @@ -105,9 +105,11 @@ TAO_Linear_ObjTable::find (const CORBA_OctetSeq &key, { ACE_ASSERT (this->next_ <= this->tablesize_); + // ACE_CString objkey ((char *)key.buffer, key.length); for (CORBA_ULong i = 0; i < this->next_; i++) { // linearly search thru the table + // if (!ACE_OS::strncmp (this->tbl_[i].opname_, objkey.rep (), key.length)) if (!ACE_OS::strncmp (this->tbl_[i].opname_, (char *)key.buffer, key.length)) { // keys match. Return the object pointer @@ -154,7 +156,8 @@ TAO_Active_Demux_ObjTable::bind (const CORBA_OctetSeq &key, { // The active demux strategy works on the assumption that the key is a // stringified form of an index into the table - CORBA_ULong i = ACE_OS::atoi ((char *)key.buffer); + ACE_CString objkey ((char *)key.buffer, key.length); + CORBA_ULong i = ACE_OS::atoi (objkey.rep ()); if (i < this->tablesize_) { @@ -176,7 +179,8 @@ int TAO_Active_Demux_ObjTable::find (const CORBA_OctetSeq &key, CORBA_Object_ptr& obj) { - CORBA_ULong i = ACE_OS::atoi ((char *)key.buffer); + ACE_CString objkey ((char *)key.buffer, key.length); + CORBA_ULong i = ACE_OS::atoi (objkey.rep ()); ACE_ASSERT (i < this->tablesize_); // cannot be equal to obj = this->tbl_[i].obj_; |