Deleted Added
full compact
connect.c (127808) connect.c (142403)
1/*
1/*
2 * Copyright (c) 1997-2003 Kungliga Tekniska H�gskolan
2 * Copyright (c) 1997-2004 Kungliga Tekniska H�gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright

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

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include "kdc_locl.h"
35
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright

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

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include "kdc_locl.h"
35
36RCSID("$Id: connect.c,v 1.90.2.1 2003/08/25 11:46:55 lha Exp $");
36RCSID("$Id: connect.c,v 1.90.2.2 2004/04/02 20:50:53 lha Exp $");
37
38/*
39 * a tuple describing on what to listen
40 */
41
42struct port_desc{
43 int family;
44 int type;

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

700 return;
701 }
702
703 n = recvfrom(d[index].s, buf, sizeof(buf), 0, NULL, NULL);
704 if(n < 0){
705 krb5_warn(context, errno, "recvfrom");
706 return;
707 } else if (n == 0) {
37
38/*
39 * a tuple describing on what to listen
40 */
41
42struct port_desc{
43 int family;
44 int type;

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

700 return;
701 }
702
703 n = recvfrom(d[index].s, buf, sizeof(buf), 0, NULL, NULL);
704 if(n < 0){
705 krb5_warn(context, errno, "recvfrom");
706 return;
707 } else if (n == 0) {
708 krb5_warnx(context, "connection closed before end of data after %d "
709 "bytes from %s", d[index].len, d[index].addr_string);
708 krb5_warnx(context, "connection closed before end of data after %lu "
709 "bytes from %s",
710 (unsigned long)d[index].len, d[index].addr_string);
710 clear_descr (d + index);
711 return;
712 }
713 if (grow_descr (&d[index], n))
714 return;
715 memcpy(d[index].buf + d[index].len, buf, n);
716 d[index].len += n;
717 if(d[index].len > 4 && d[index].buf[0] == 0) {

--- 92 unchanged lines hidden ---
711 clear_descr (d + index);
712 return;
713 }
714 if (grow_descr (&d[index], n))
715 return;
716 memcpy(d[index].buf + d[index].len, buf, n);
717 d[index].len += n;
718 if(d[index].len > 4 && d[index].buf[0] == 0) {

--- 92 unchanged lines hidden ---