Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
rpcbind
0024-rpcinfo-remove-obsolete-function-get_inet_...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0024-rpcinfo-remove-obsolete-function-get_inet_address.patch of Package rpcbind
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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor