summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/rpc_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/rpc/rpc_generic.c')
-rw-r--r--lib/libc/rpc/rpc_generic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/rpc/rpc_generic.c b/lib/libc/rpc/rpc_generic.c
index ab259d5..0ac4597 100644
--- a/lib/libc/rpc/rpc_generic.c
+++ b/lib/libc/rpc/rpc_generic.c
@@ -269,7 +269,8 @@ __rpc_getconfip(nettype)
}
while ((nconf = getnetconfig(confighandle)) != NULL) {
if (strcmp(nconf->nc_protofmly, NC_INET) == 0) {
- if (strcmp(nconf->nc_proto, NC_TCP) == 0) {
+ if (strcmp(nconf->nc_proto, NC_TCP) == 0 &&
+ netid_tcp == NULL) {
netid_tcp = strdup(nconf->nc_netid);
if (main_thread)
netid_tcp_main = netid_tcp;
@@ -277,7 +278,8 @@ __rpc_getconfip(nettype)
thr_setspecific(tcp_key,
(void *) netid_tcp);
} else
- if (strcmp(nconf->nc_proto, NC_UDP) == 0) {
+ if (strcmp(nconf->nc_proto, NC_UDP) == 0 &&
+ netid_udp == NULL) {
netid_udp = strdup(nconf->nc_netid);
if (main_thread)
netid_udp_main = netid_udp;
OpenPOWER on IntegriCloud