[Midnightbsd-cvs] src [8189] trunk/lib/libc/rpc/rpc_generic.c: fix __rpc_getconfip
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 17 11:35:27 EDT 2016
Revision: 8189
http://svnweb.midnightbsd.org/src/?rev=8189
Author: laffer1
Date: 2016-09-17 11:35:27 -0400 (Sat, 17 Sep 2016)
Log Message:
-----------
fix __rpc_getconfip
Modified Paths:
--------------
trunk/lib/libc/rpc/rpc_generic.c
Modified: trunk/lib/libc/rpc/rpc_generic.c
===================================================================
--- trunk/lib/libc/rpc/rpc_generic.c 2016-09-17 15:34:38 UTC (rev 8188)
+++ trunk/lib/libc/rpc/rpc_generic.c 2016-09-17 15:35:27 UTC (rev 8189)
@@ -269,7 +269,8 @@
}
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 @@
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;
More information about the Midnightbsd-cvs
mailing list