X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/4fd842f98df4970f6e49a0365dbed60774e56c09..82b2a31a46d7c94f951b96f61c9935198f0f53f1:/clientname.c diff --git a/clientname.c b/clientname.c index d32b9d35..e5684f8f 100644 --- a/clientname.c +++ b/clientname.c @@ -3,11 +3,12 @@ * * Copyright (C) 1992-2001 Andrew Tridgell * Copyright (C) 2001, 2002 Martin Pool - * Copyright (C) 2002-2007 Wayne Davison + * Copyright (C) 2002-2009 Wayne Davison * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3 as - * published by the Free Software Foundation. + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 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 @@ -107,6 +108,9 @@ char *client_name(int fd) struct addrinfo hint, *answer; int err; + if (strcmp(addr, "0.0.0.0") == 0) + return name_buf; + memset(&hint, 0, sizeof hint); #ifdef AI_NUMERICHOST @@ -265,7 +269,7 @@ int compare_addrinfo_sockaddr(const struct addrinfo *ai, if (ai->ai_addrlen < sizeof (struct sockaddr_in6)) { rprintf(FLOG, "%s: too short sockaddr_in6; length=%d\n", - fn, ai->ai_addrlen); + fn, (int)ai->ai_addrlen); return 1; }