X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/fde045cd778e6b1f6ecb6189ed869e2a34195593..e7c67065c060d500eba8d073da9568db2c658aad:/clientname.c diff --git a/clientname.c b/clientname.c index 7b36f78b..9ac5ed5b 100644 --- a/clientname.c +++ b/clientname.c @@ -1,40 +1,35 @@ -/* -*- c-file-style: "linux" -*- - - rsync -- fast file replication program - - Copyright (C) 1992-2001 by Andrew Tridgell - Copyright (C) 2001, 2002 by Martin Pool - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -/** - * @file clientname.c - * +/* * Functions for looking up the remote name or addr of a socket. * + * Copyright (C) 1992-2001 Andrew Tridgell + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2002, 2003, 2004 Wayne Davison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* * This file is now converted to use the new-style getaddrinfo() * interface, which supports IPv6 but is also supported on recent * IPv4-only machines. On systems that don't have that interface, we * emulate it using the KAME implementation. - **/ + */ #include "rsync.h" static const char default_name[] = "UNKNOWN"; -extern int am_daemon; extern int am_server; @@ -189,7 +184,7 @@ void client_sockaddr(int fd, memset(sin, 0, sizeof *sin); sin->sin_family = AF_INET; *ss_len = sizeof (struct sockaddr_in); -#if HAVE_SOCKADDR_IN_LEN +#ifdef HAVE_SOCKADDR_IN_LEN sin->sin_len = *ss_len; #endif sin->sin_port = sin6.sin6_port; @@ -321,7 +316,6 @@ int check_name(int fd, return error; } - /* Given all these results, we expect that one of them will be * the same as ss. The comparison is a bit complicated. */ for (res = res0; res; res = res->ai_next) {