[omniORB] [help] [beginner] cannot run naming service examples from python chapter 2 "The Basics"

Duncan Grisby duncan at grisby.org
Thu Sep 8 17:46:35 BST 2011


On Fri, 2011-09-02 at 09:19 +1200, Alistair Bayley wrote:

> Sorry, here's the entire file:
> 
> 127.0.0.1	localhost

[...]
> # The following lines are desirable for IPv6 capable hosts
> ::1     localhost ip6-localhost ip6-loopback

That is no doubt the problem. When omniORB resolves "localhost", it gets
the ::1 IPv6 loopback instead of 127.0.0.1. The server is presumably
only listening on IPv4 (although I'd expect it to listen on IPv6 too --
perhaps the Ubuntu package changes the default?)

omniORB 4.1.5 changed it so that if a name resolves to more than one
address, omniORB tries all of them until one works. 4.1.2 only tried the
first one.

[...]
> >        "An enumeration is mapped into a number of constant objects in
> >        the name space where the enumeration is defined. An application
> >        may only test for equivalence of two enumeration values, and not
> >        assume that they behave like numbers."
> 
> Well, that makes it clearer what I should do. There is already a
> mapping in my domain (from enum to ints); I was simply hoping that
> such a mapping was part of the enum spec, so I could take advantage of
> it, rather than write it myself.

If you don't mind being omniORBpy specific, you can access the _v
member, which is the numeric value of the enum.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --





More information about the omniORB-list mailing list