[Openais] Re: Variable this_ip

Steven Dake sdake at mvista.com
Fri Jul 9 17:55:11 PDT 2004

On Fri, 2004-07-09 at 17:49, Sabharwal, Atul wrote:
> There is a global variable which I had to define "this_ip". I copied it
> from 
> Openais/exec/main.c.  There is no initialization done for this socket
> but the
> code works. 
> I must be missing something.

This is a bug in the gmi (that you had to define this_ip).  It shouldn't
require the specific variable this_ip.  I'll fix that in the tree soon.

When you call gmi_init it looks something like this:

    gmi_init (&sockaddr_in_mcast, &sockaddr_in_bindnet,
&aisexec_poll_handle, &this_ip);

The gmi_init figures out the local ip address of the interface it is
using (bound to the network in sockaddr_in_bindnet) and stores it in
this_ip.  That is why this_ip contains the correct ip address (it is
initialized in gmi_init).


> --
> Atul
> -------------------------------------------------------------
> P.S:  All opinions are my personal opinion(s) & responsibility and do
> not represent the view of my employer ( Intel Corporation ).

More information about the Openais mailing list