Following the switch to ypconnect(), several fields in the dom_binding
struct used internally are no longer needed. The following diff removes
them.
Index: yp/ypinternal.h
===================================================================
RCS file: /OpenBSD/src/lib/libc/yp/ypinternal.h,v
retrieving revision 1.13
diff -u -p -r1.13 ypinternal.h
--- yp/ypinternal.h 17 Jul 2022 03:08:58 -0000 1.13
+++ yp/ypinternal.h 22 Jul 2022 06:43:15 -0000
@@ -31,14 +31,9 @@
* yp_prot.h and yp.h.
*/
struct dom_binding {
- struct dom_binding *dom_pnext;
- char dom_domain[YPMAXDOMAIN + 1];
struct sockaddr_in dom_server_addr;
- u_short dom_server_port;
int dom_socket;
CLIENT *dom_client;
- u_short dom_local_port;
- long dom_vers;
};
#define BINDINGDIR "/var/yp/binding"
Index: yp/yp_first.c
===================================================================
RCS file: /OpenBSD/src/lib/libc/yp/yp_first.c,v
retrieving revision 1.11
diff -u -p -r1.11 yp_first.c
--- yp/yp_first.c 13 Sep 2015 20:57:28 -0000 1.11
+++ yp/yp_first.c 22 Jul 2022 06:43:15 -0000
@@ -69,7 +69,6 @@ again:
if (r != RPC_SUCCESS) {
if (tries++)
clnt_perror(ysd->dom_client, "yp_first: clnt_call");
- ysd->dom_vers = -1;
goto again;
}
if (!(r = ypprot_err(yprkv.stat))) {
Index: yp/yp_maplist.c
===================================================================
RCS file: /OpenBSD/src/lib/libc/yp/yp_maplist.c,v
retrieving revision 1.9
diff -u -p -r1.9 yp_maplist.c
--- yp/yp_maplist.c 16 Jan 2015 16:48:51 -0000 1.9
+++ yp/yp_maplist.c 22 Jul 2022 06:43:15 -0000
@@ -56,7 +56,6 @@ again:
if (r != RPC_SUCCESS) {
if (tries++)
clnt_perror(ysd->dom_client, "yp_maplist: clnt_call");
- ysd->dom_vers = -1;
goto again;
}
*outmaplist = ypml.maps;
Index: yp/yp_master.c
===================================================================
RCS file: /OpenBSD/src/lib/libc/yp/yp_master.c,v
retrieving revision 1.9
diff -u -p -r1.9 yp_master.c
--- yp/yp_master.c 16 Jan 2015 16:48:51 -0000 1.9
+++ yp/yp_master.c 22 Jul 2022 06:43:15 -0000
@@ -65,7 +65,6 @@ again:
if (r != RPC_SUCCESS) {
if (tries++)
clnt_perror(ysd->dom_client, "yp_master: clnt_call");
- ysd->dom_vers = -1;
goto again;
}
if (!(r = ypprot_err(yprm.stat))) {
Index: yp/yp_order.c
===================================================================
RCS file: /OpenBSD/src/lib/libc/yp/yp_order.c,v
retrieving revision 1.10
diff -u -p -r1.10 yp_order.c
--- yp/yp_order.c 16 Jan 2015 16:48:51 -0000 1.10
+++ yp/yp_order.c 22 Jul 2022 06:43:15 -0000
@@ -72,7 +72,6 @@ again:
}
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_order: clnt_call");
- ysd->dom_vers = -1;
goto again;
}
*outorder = ypro.ordernum;
Index: yp/ypmatch_cache.c
===================================================================
RCS file: /OpenBSD/src/lib/libc/yp/ypmatch_cache.c,v
retrieving revision 1.17
diff -u -p -r1.17 ypmatch_cache.c
--- yp/ypmatch_cache.c 13 Sep 2015 20:57:28 -0000 1.17
+++ yp/ypmatch_cache.c 22 Jul 2022 06:43:15 -0000
@@ -187,7 +187,6 @@ again:
if (r != RPC_SUCCESS) {
if (tries++)
clnt_perror(ysd->dom_client, "yp_match: clnt_call");
- ysd->dom_vers = -1;
goto again;
}
if (!(r = ypprot_err(yprv.stat))) {
@@ -248,7 +247,6 @@ again:
if (r != RPC_SUCCESS) {
if (tries++)
clnt_perror(ysd->dom_client, "yp_next: clnt_call");
- ysd->dom_vers = -1;
goto again;
}
if (!(r = ypprot_err(yprkv.stat))) {