blob: 2cec54ed75033df6fcca2766099c67c0bba26fcf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--- mico/idl/main.cc
+++ mico/idl/main.cc 2011-11-25 23:52:43.149752575 +0100
@@ -82,6 +82,13 @@
DB db;
// ORB initialization
+ // Resolving the hostname is useless in the IDL compiler.
+ vector<char*> argvv;
+ argvv.push_back(argv[0]);
+ argvv.push_back(strdup("-ORBNoResolve"));
+ argvv.insert(argvv.end(), &argv[1], &argv[argc]);
+ ++argc;
+ argv = &argvv.front();
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
#ifdef _WIN32
--- mico/orb/address.cc
+++ mico/orb/address.cc
@@ -635,8 +635,12 @@
{
if (hname.length() == 0) {
char buf[200];
+ if (_resolve) {
int r = gethostname (buf, 200);
assert (r == 0);
+ } else {
+ strcpy(buf, "localhost");
+ }
/*
* some OSes do not return an FQDN. So we get the ip address for the
* hostname and resolve that address into the FQDN...
|