summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp')
-rw-r--r--TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp
index 699d4144c5a..75d1ae02c5d 100644
--- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp
+++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp
@@ -416,7 +416,13 @@ ECM_Driver::parse_config_file (void)
int port;
if (this->skip_blanks (cfg, "reading federation port number"))
return -1;
- fscanf (cfg, "%d", &port);
+ s = fscanf (cfg, "%d", &port);
+ if (s == 0 || s == EOF)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "problem reading federation port number\n"), -1);
+ }
+
CORBA::UShort mcast_port = static_cast<CORBA::UShort> (port);
int ns, nc;