rpcbind/0024-rpcinfo-remove-obsolete-function-get_inet_address.patch
Dirk Mueller 868d58656c Accepting request 215477 from home:okir:branches:network
- Fixed rpc broadcast handling (bnc#857324)
  Upgraded to upstream 0.2.1-rc4 as part of this, and rebased the
  patch set.

OBS-URL: https://build.opensuse.org/request/show/215477
OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=32
2014-01-30 14:01:34 +00:00

77 lines
2.1 KiB
Diff

From c2d5de2c81e9d8d4cdaaafa2b7ae925c6e62c5ad Mon Sep 17 00:00:00 2001
From: Olaf Kirch <okir@suse.de>
Date: Mon, 20 Jan 2014 13:09:46 +0100
Subject: [PATCH 24/24] rpcinfo: remove obsolete function get_inet_address
Signed-off-by: Olaf Kirch <okir@suse.de>
---
src/rpcinfo.c | 45 ---------------------------------------------
1 file changed, 45 deletions(-)
diff --git a/src/rpcinfo.c b/src/rpcinfo.c
index 2981240..2c7d897 100644
--- a/src/rpcinfo.c
+++ b/src/rpcinfo.c
@@ -116,7 +116,6 @@ struct rpcbdump_short
#ifdef PORTMAP
static void ip_ping (u_short, char *, int, char **);
static void pmapdump (int, char **);
-static void get_inet_address (struct sockaddr_in *, char *);
static CLIENT *ip_getclient(const char *hostname, rpcprog_t prognum, rpcvers_t versnum, const char *proto);
#endif
@@ -574,50 +573,6 @@ pmapdump (argc, argv)
}
}
-static void
-get_inet_address (addr, host)
- struct sockaddr_in *addr;
- char *host;
-{
- struct netconfig *nconf;
- struct addrinfo hints, *res;
- int error;
-
- (void) memset ((char *) addr, 0, sizeof (*addr));
- addr->sin_addr.s_addr = inet_addr (host);
- if (addr->sin_addr.s_addr == -1 || addr->sin_addr.s_addr == 0)
- {
- if ((nconf = __rpc_getconfip ("udp")) == NULL &&
- (nconf = __rpc_getconfip ("tcp")) == NULL)
- {
- fprintf (stderr, "rpcinfo: couldn't find a suitable transport\n");
- exit (1);
- }
- else
- {
- memset (&hints, 0, sizeof hints);
- hints.ai_family = AF_INET;
- if ((error = getaddrinfo (host, "rpcbind", &hints, &res)) != 0 &&
- (error = getaddrinfo (host, "portmapper", &hints, &res)) != 0)
- {
- fprintf (stderr, "rpcinfo: %s: %s\n",
- host, gai_strerror (error));
- exit (1);
- }
- else
- {
- memcpy (addr, res->ai_addr, res->ai_addrlen);
- freeaddrinfo (res);
- }
- (void) freenetconfigent (nconf);
- }
- }
- else
- {
- addr->sin_family = AF_INET;
- }
-}
-
/*
* Try to obtain the address of a given host/program/version, using the
* specified protocol (one of udp or tcp).
--
1.7.12.4