gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1711-g2c75a7f
Date: Tue, 06 Aug 2013 22:01:49 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  2c75a7f76d6e24f745bcfe89fed8a6a9857ab10d (commit)
      from  21c5654793c4f32b9edc161baee78e5d67423f18 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=2c75a7f76d6e24f745bcfe89fed8a6a9857ab10d


commit 2c75a7f76d6e24f745bcfe89fed8a6a9857ab10d
Author: Bastiaan Jacques <address@hidden>
Date:   Tue Aug 6 23:59:29 2013 +0200

    Workarounds for localhost lookup should no longer be required since
    XmlSocketServer.pl was updated.

diff --git a/libbase/Socket.cpp b/libbase/Socket.cpp
index c6321c2..37516a3 100644
--- a/libbase/Socket.cpp
+++ b/libbase/Socket.cpp
@@ -155,34 +155,12 @@ Socket::connect(const std::string& hostname, 
boost::uint16_t port)
     req.ai_family = AF_UNSPEC;  // Allow IPv4 or IPv6
     req.ai_socktype = SOCK_STREAM;
 
-    // getaddrinfo() is sensitive to how localhost is defined in
-    // /etc/hosts. Whatever hostname is, needs to match the entry in
-    // the hosts file. Localhost is usually only used for debug and
-    // and testing, all other hostnames are fully qualified. Anyway,
-    // this causes our XMLSocketTester test case to fail since not
-    // all build slaves have the same entry for localhost in their
-    // hosts file.
     std::string portNo = boost::lexical_cast<std::string>(port);
     code = getaddrinfo(hostname.c_str(), portNo.c_str(), &req, &ans);
     if (code != 0) {
-        if (code == EAI_NONAME) {
-            std::string localhost;
-            if (hostname == "localhost") {
-                localhost = "localhost.localdomain";
-            } else if (hostname == "localhost.localdomain") {
-                localhost = "localhost";                
-            }
-            if ((code = getaddrinfo(localhost.c_str(), 0, &req, &ans)) != 0) {
-                log_error(_("getaddrinfo() failed again with code: #%d - 
%s\n"),
-                          code, gai_strerror(code));
-                return false;
-            }
-            log_error(_("getaddrinfo() needed to change localhost, check your 
/etc/hosts file!"));
-        } else {
-            log_error(_("getaddrinfo() failed with code: #%d - %s\n"),
-                      code, gai_strerror(code));
-            return false;
-        }
+        log_error(_("getaddrinfo() failed with code: #%d - %s\n"),
+                 code, gai_strerror(code));
+        return false;
     }
 
     // display all the IP numbers
diff --git a/testsuite/misc-ming.all/XMLSocketTest.as 
b/testsuite/misc-ming.all/XMLSocketTest.as
index 7ca34c7..586e82c 100644
--- a/testsuite/misc-ming.all/XMLSocketTest.as
+++ b/testsuite/misc-ming.all/XMLSocketTest.as
@@ -80,7 +80,7 @@ function test1()
   myXML.onClose = handleDisconnect;
   receivedArray = new Array();
 
-  ret = myXML.connect("localhost.localdomain", 2229);
+  ret = myXML.connect("localhost", 2229);
   check_equals(ret, true);
 }
 
@@ -119,7 +119,7 @@ function test2()
   o.onData = function() { fail("instance onData called"); };
   o.onClose = function() { fail("instance onClose called"); };
 
-  ret = o.connect("localhost.localdomain", 2229);
+  ret = o.connect("localhost", 2229);
   xcheck_equals(ret, true);
   nextTest();
 }

-----------------------------------------------------------------------

Summary of changes:
 libbase/Socket.cpp                       |   28 +++-------------------------
 testsuite/misc-ming.all/XMLSocketTest.as |    4 ++--
 2 files changed, 5 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]