Deleted Added
full compact
ypxfr_misc.c (93979) ypxfr_misc.c (95658)
1/*
2 * Copyright (c) 1995
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#ifndef lint
34static const char rcsid[] =
1/*
2 * Copyright (c) 1995
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#ifndef lint
34static const char rcsid[] =
35 "$FreeBSD: head/libexec/ypxfr/ypxfr_misc.c 93979 2002-04-06 19:08:02Z des $";
35 "$FreeBSD: head/libexec/ypxfr/ypxfr_misc.c 95658 2002-04-28 15:18:50Z des $";
36#endif /* not lint */
37
38#include <stdio.h>
39#include <string.h>
40#include <stdlib.h>
41#include <unistd.h>
42#include <sys/param.h>
43#include <rpc/rpc.h>

--- 214 unchanged lines hidden (view full) ---

258ypxfr_match(char *server, char *domain, char *map, char *key,
259 unsigned long keylen)
260{
261 ypreq_key ypkey;
262 ypresp_val *ypval;
263 CLIENT *clnt;
264 static char buf[YPMAXRECORD + 2];
265
36#endif /* not lint */
37
38#include <stdio.h>
39#include <string.h>
40#include <stdlib.h>
41#include <unistd.h>
42#include <sys/param.h>
43#include <rpc/rpc.h>

--- 214 unchanged lines hidden (view full) ---

258ypxfr_match(char *server, char *domain, char *map, char *key,
259 unsigned long keylen)
260{
261 ypreq_key ypkey;
262 ypresp_val *ypval;
263 CLIENT *clnt;
264 static char buf[YPMAXRECORD + 2];
265
266 bzero((char *)buf, sizeof(buf));
266 bzero(buf, sizeof(buf));
267
268 if ((clnt = clnt_create(server, YPPROG,YPVERS,"udp")) == NULL) {
269 yp_error("failed to create UDP handle: %s",
270 clnt_spcreateerror(server));
271 return(0);
272 }
273
274 ypkey.domain = domain;

--- 6 unchanged lines hidden (view full) ---

281 yp_error("%s: %s", server,
282 clnt_sperror(clnt,"YPPROC_MATCH failed"));
283 return(0);
284 }
285
286 clnt_destroy(clnt);
287
288 if (ypval->stat != YP_TRUE) {
267
268 if ((clnt = clnt_create(server, YPPROG,YPVERS,"udp")) == NULL) {
269 yp_error("failed to create UDP handle: %s",
270 clnt_spcreateerror(server));
271 return(0);
272 }
273
274 ypkey.domain = domain;

--- 6 unchanged lines hidden (view full) ---

281 yp_error("%s: %s", server,
282 clnt_sperror(clnt,"YPPROC_MATCH failed"));
283 return(0);
284 }
285
286 clnt_destroy(clnt);
287
288 if (ypval->stat != YP_TRUE) {
289 xdr_free(xdr_ypresp_val, (char *)ypval);
289 xdr_free((xdrproc_t)xdr_ypresp_val, ypval);
290 return(0);
291 }
292
290 return(0);
291 }
292
293 xdr_free(xdr_ypresp_val, (char *)ypval);
293 xdr_free((xdrproc_t)xdr_ypresp_val, ypval);
294
295 return(1);
296}
294
295 return(1);
296}