[Vm-dev] unix nameToAddr() function appears to not work on
Raspbian?
David T. Lewis
lewis at mail.msen.com
Mon Sep 21 01:07:24 UTC 2015
On Sun, Sep 20, 2015 at 03:34:35PM -0700, tim Rowledge wrote:
>
>
> On 19-09-2015, at 7:14 AM, David T. Lewis <lewis at mail.msen.com> wrote:
> >
> > NetNameResolver addressesForName: ?google.com'
> >
> [snip]
>
> The annoying part there is that NetNameResolver addressesForName:?myPi? quite clearly works out that myPi is the local host and then carefully returns 127.0.0.1 and no other.
>
> > The #addressesForName: method is used to look up names such as 'localhost' or
> > your local host name. Results will vary depending on network configuration,
> > contents of /etc/hosts, and so forth.
>
> And therein lies the rub; this used to work for the purpose of giving Scratch mesh network users a usable number but no longer does. It apparently used to work generally for most of us since the code just about the same in all platforms. (Well, except for OS X of course, which has to do everything different)
>
> I?m sure we can eventually come up with something that will work but it really annoys me that what has worked for an apparent decade plus has suddenly become not-right without even a by-your-leave.
>
Um ... are you sure that this "worked" previously? I just tried a Squeak
3.8 image, and it says that NetNameResolver localHostAddress is 127.0.1.1,
which is exactly what Squeak 5.0 says on this same computer.
I suspect that you are just running Squeak on a different platform, and
"NetNameResolver addressForName: self localHostName" is in fact different
compared to whatever it was on your previous systems.
Dave
More information about the Vm-dev
mailing list