X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fafpd%2Fafp_config.c;h=8c8ac012ad964c79e441d9463869bc4fe096203f;hb=refs%2Ftags%2Fafter-ipv6;hp=46bd684f9a92ef1bc9cb0d89136738c60dbca33f;hpb=25a8f9a337914d7459a112ec131d30d7c3a77554;p=netatalk.git diff --git a/etc/afpd/afp_config.c b/etc/afpd/afp_config.c index 46bd684f..8c8ac012 100644 --- a/etc/afpd/afp_config.c +++ b/etc/afpd/afp_config.c @@ -1,5 +1,5 @@ /* - * $Id: afp_config.c,v 1.27 2009-02-16 12:56:42 franklahm Exp $ + * $Id: afp_config.c,v 1.29 2009-11-05 14:38:07 franklahm Exp $ * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * All Rights Reserved. See COPYRIGHT. @@ -117,7 +117,7 @@ static char * srvloc_encode(const struct afp_options *options, const char *name) /* Convert name to maccharset */ if ((size_t)-1 ==(convert_string_allocate( options->unixcharset, options->maccharset, - name, strlen(name), &conv_name)) ) + name, -1, &conv_name)) ) return (char*)name; /* Escape characters */ @@ -365,6 +365,11 @@ static AFPConfig *DSIConfigInit(const struct afp_options *options, return NULL; } + LOG(log_debug, logtype_afpd, "DSIConfigInit: hostname: %s, ip/port: %s/%s, ", + options->hostname, + options->ipaddr ? options->ipaddr : "default", + options->port ? options->port : "548"); + if ((dsi = dsi_init(protocol, "afpd", options->hostname, options->ipaddr, options->port, options->flags & OPTION_PROXY, @@ -375,13 +380,11 @@ static AFPConfig *DSIConfigInit(const struct afp_options *options, } if (options->flags & OPTION_PROXY) { - LOG(log_info, logtype_afpd, "ASIP proxy initialized for %s:%d (%s)", - inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), - VERSION); + LOG(log_info, logtype_afpd, "AFP/TCP proxy initialized for %s:%d (%s)", + getip_string((struct sockaddr *)&dsi->server), getip_port((struct sockaddr *)&dsi->server), VERSION); } else { - LOG(log_info, logtype_afpd, "ASIP started on %s:%d(%d) (%s)", - inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port), - dsi->serversock, VERSION); + LOG(log_info, logtype_afpd, "AFP/TCP started, advertising %s:%d (%s)", + getip_string((struct sockaddr *)&dsi->server), getip_port((struct sockaddr *)&dsi->server), VERSION); } #ifdef USE_SRVLOC