Schmidt Thomas
2009-01-05 21:57:18 UTC
Hi,
Here are some more minor bug fixes:
1. mico/demo/services/relship/TestServer.cc
BaseRole and DerivedRole should be added without path component
"omg.org/".
So instead of
NamedRoleTypesHelper* nrth_TestRelationship = new
NamedRoleTypesHelper (orb);
nrth_TestRelationship->add ("IDL:omg.org/Test/BaseRole:1.0",
"BaseRole");
nrth_TestRelationship->add ("IDL:omg.org/Test/
DerivedRole1:1.0", "DerivedRole1");
you should better write
NamedRoleTypesHelper* nrth_TestRelationship = new
NamedRoleTypesHelper (orb);
nrth_TestRelationship->add ("IDL:Test/BaseRole:1.0",
"BaseRole");
nrth_TestRelationship->add ("IDL:Test/DerivedRole1:1.0",
"DerivedRole1");
2. mico/coss/relship/RandomGenerator_impl.cc
Bug fix of my previous fix. Method RandomGenerator_impl::rand()
should check for 'proxy' mode
only if check for 'generate' mode failed. Instead of:
if (mode == RandomGenerator::generate)
number = ::rand ();
if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
}
else {
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
}
}
Add an 'else':
if (mode == RandomGenerator::generate) {
number = ::rand ();
}
else if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
}
else {
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
number = 0; // Avoid compiler warnings
}
}
else {
number = 0; // Should never happen. Exception?
}
Otherwise rand() would ever return 'zero' in 'generate' mode.
3. ROADMAP
'imr' is not a directory under micos devel root. Instead it is
part of directory 'daemon'.
Thomas Schmidt
--
Thomas Schmidt
Schneiderstr. 16
D-29575 Altenmedingen
Phone: +49-5807-209976
Cellular: +49-172-3011505
Skype: ThCSchmidt
Email: ***@vodafone.de
PGP: Key-ID: 0x810B6206
Here are some more minor bug fixes:
1. mico/demo/services/relship/TestServer.cc
BaseRole and DerivedRole should be added without path component
"omg.org/".
So instead of
NamedRoleTypesHelper* nrth_TestRelationship = new
NamedRoleTypesHelper (orb);
nrth_TestRelationship->add ("IDL:omg.org/Test/BaseRole:1.0",
"BaseRole");
nrth_TestRelationship->add ("IDL:omg.org/Test/
DerivedRole1:1.0", "DerivedRole1");
you should better write
NamedRoleTypesHelper* nrth_TestRelationship = new
NamedRoleTypesHelper (orb);
nrth_TestRelationship->add ("IDL:Test/BaseRole:1.0",
"BaseRole");
nrth_TestRelationship->add ("IDL:Test/DerivedRole1:1.0",
"DerivedRole1");
2. mico/coss/relship/RandomGenerator_impl.cc
Bug fix of my previous fix. Method RandomGenerator_impl::rand()
should check for 'proxy' mode
only if check for 'generate' mode failed. Instead of:
if (mode == RandomGenerator::generate)
number = ::rand ();
if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
}
else {
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
}
}
Add an 'else':
if (mode == RandomGenerator::generate) {
number = ::rand ();
}
else if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
}
else {
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
number = 0; // Avoid compiler warnings
}
}
else {
number = 0; // Should never happen. Exception?
}
Otherwise rand() would ever return 'zero' in 'generate' mode.
3. ROADMAP
'imr' is not a directory under micos devel root. Instead it is
part of directory 'daemon'.
Thomas Schmidt
--
Thomas Schmidt
Schneiderstr. 16
D-29575 Altenmedingen
Phone: +49-5807-209976
Cellular: +49-172-3011505
Skype: ThCSchmidt
Email: ***@vodafone.de
PGP: Key-ID: 0x810B6206