| 1 |
--- ORBit2-2.14.3/linc2/src/linc-connection.c.non-local-ipv4 2006-09-10 14:43:46.000000000 -0400
|
| 2 |
+++ ORBit2-2.14.3/linc2/src/linc-connection.c 2006-09-10 14:44:00.000000000 -0400
|
| 3 |
@@ -495,27 +495,6 @@
|
| 4 |
CNX_UNLOCK (cnx);
|
| 5 |
}
|
| 6 |
|
| 7 |
-static unsigned long
|
| 8 |
-get_inet_addr (const char *str)
|
| 9 |
-{
|
| 10 |
- struct hostent *hp;
|
| 11 |
- struct in_addr *addr_ptr;
|
| 12 |
- unsigned long addr;
|
| 13 |
-
|
| 14 |
- if (isdigit (*str)) {
|
| 15 |
- addr = inet_addr (str);
|
| 16 |
- } else {
|
| 17 |
- if ((hp = gethostbyname (str)) != NULL) {
|
| 18 |
-
|
| 19 |
- addr_ptr = (struct in_addr *) hp->h_addr;
|
| 20 |
-
|
| 21 |
- addr = inet_addr (inet_ntoa (*addr_ptr));
|
| 22 |
- }
|
| 23 |
- }
|
| 24 |
-
|
| 25 |
- return addr;
|
| 26 |
-}
|
| 27 |
-
|
| 28 |
static gboolean
|
| 29 |
link_connection_do_initiate (LinkConnection *cnx,
|
| 30 |
const char *proto_name,
|
| 31 |
@@ -535,21 +514,6 @@
|
| 32 |
if (!proto)
|
| 33 |
return FALSE;
|
| 34 |
|
| 35 |
- if (host && (strcmp (proto_name, "IPv4") == 0)) {
|
| 36 |
-
|
| 37 |
- const char *local_host;
|
| 38 |
- local_host = link_get_local_hostname ();
|
| 39 |
-
|
| 40 |
- if (strcmp (host, local_host)) {
|
| 41 |
- unsigned long inet_addr_host, inet_addr_local_host;
|
| 42 |
- inet_addr_host = get_inet_addr (host);
|
| 43 |
- inet_addr_local_host = get_inet_addr (local_host);
|
| 44 |
-
|
| 45 |
- if (inet_addr_host != inet_addr_local_host)
|
| 46 |
- return FALSE;
|
| 47 |
- }
|
| 48 |
- }
|
| 49 |
-
|
| 50 |
saddr = link_protocol_get_sockaddr (
|
| 51 |
proto, host, service, &saddr_len);
|
| 52 |
|