Changeset 6471
- Timestamp:
- 02/15/08 14:39:58 (5 years ago)
- Location:
- ossie/trunk/ossie/framework
- Files:
-
- 2 modified
-
ApplicationFactory_impl.cpp (modified) (2 diffs)
-
DeviceManager_impl.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ossie/trunk/ossie/framework/ApplicationFactory_impl.cpp
r6323 r6471 1 1 /**************************************************************************** 2 2 3 Copyright 2004, 2005, 2006, 2007 Virginia Polytechnic Institute and State University3 Copyright 2004, 2005, 2006, 2007, 2008 Virginia Polytechnic Institute and State University 4 4 5 5 This file is part of the OSSIE Core Framework. … … 257 257 258 258 // Wait for component to start 259 do{259 for (unsigned int delay(50000);;) { 260 260 try { 261 261 _obj = orb->get_object_from_name(waveformContext, _lookupName.c_str()); 262 } catch (CosNaming::NamingContext::NotFound) { 263 }; 264 ///\todo Check the name not found exceptions and make certain this is correct 265 ossieSupport::nsleep(0,50 * 1000); 266 } while (CORBA::is_nil (_obj)); 262 } catch (CosNaming::NamingContext::NotFound) {}; 263 264 if (!CORBA::is_nil(_obj)) 265 break; 266 267 ///\todo Figure out how to get rid of this sleep 268 ossieSupport::nsleep(0, delay); 269 270 if (delay < 1000000) 271 delay *= 2; 272 } 267 273 268 274 // check to see if the resource is the assembly controller -
ossie/trunk/ossie/framework/DeviceManager_impl.cpp
r6151 r6471 153 153 154 154 CORBA::Object_var _obj = CORBA::Object::_nil(); 155 ///\todo Convert to use iostream, you can buffer overflow with long usageName 155 156 char nameStr[255]; 156 157 sprintf( nameStr, "DomainName1/%s", componentPlacements[i].usageName() ); 157 158 DEBUG(3, DevMgr, "searching for "<< nameStr); 158 do{159 for (unsigned int delay(50000);;) { 159 160 /// \todo sleep prevents system from beating Name Service to death, Fix better 160 ossieSupport::nsleep(0, 50*1000); 161 try { 161 ossieSupport::nsleep(0, delay); 162 163 try { // the call will throw if the name is not found 162 164 _obj = orb_obj->get_object_from_name(nameStr); 163 165 } catch (CosNaming::NamingContext::NotFound) {}; 166 167 if (!CORBA::is_nil(_obj)) 168 break; 169 170 if (delay < 1000000) 171 delay *= 2; 164 172 } 165 while (CORBA::is_nil (_obj)); 173 166 174 DEBUG(3, DevMgr, "found "<< nameStr); 167 175 … … 228 236 229 237 /// \todo sleep prevents system from beating Name Service to death, Fix better 230 do{ 231 obj = orb_obj->get_object_from_name (domainManagerName); 232 usleep(1000); 233 }while(CORBA::is_nil(obj)); 234 238 for (unsigned int delay(1000);;) { 239 240 try { 241 obj = orb_obj->get_object_from_name (domainManagerName); 242 } catch (CosNaming::NamingContext::NotFound) {}; 243 244 if (!CORBA::is_nil(obj)) 245 break; 246 247 usleep(delay); 248 249 if (delay < 1000000) 250 delay *= 2; 251 } 252 235 253 _dmnMgr = CF::DomainManager::_narrow (obj); 236 254 }