]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_avahi.c
Support for using $u username variable in AFP volume definitions
[netatalk.git] / etc / afpd / afp_avahi.c
index f5eb73cde7c1cd1ee99257b23f824d558f11f87e..5218d51758aebb0554298465c34c63436c67d541 100644 (file)
@@ -22,9 +22,8 @@
 #include <atalk/unicode.h>
 #include <atalk/netatalk_conf.h>
 
+#include "afp_zeroconf.h"
 #include "afp_avahi.h"
-#include "afp_config.h"
-#include "volume.h"
 
 /*****************************************************************
  * Global variables
@@ -71,7 +70,7 @@ static void register_stuff(void) {
                
         for (volume = getvolumes(); volume; volume = volume->v_next) {
 
-            if (convert_string(CH_UCS2, CH_UTF8_MAC, volume->v_name, -1, tmpname, 255) <= 0) {
+            if (convert_string(CH_UCS2, CH_UTF8_MAC, volume->v_u8mname, -1, tmpname, 255) <= 0) {
                 LOG ( log_error, logtype_afpd, "Could not set Zeroconf volume name for TimeMachine");
                 goto fail;
             }
@@ -95,7 +94,7 @@ static void register_stuff(void) {
         for (dsi = ctx->obj->dsi; dsi; dsi = dsi->next) {
             port = getip_port((struct sockaddr *)&dsi->server);
 
-            LOG(log_error, logtype_afpd, "hostname: %s", ctx->obj->options.hostname);
+            LOG(log_info, logtype_afpd, "hostname: %s", ctx->obj->options.hostname);
 
             if (convert_string(ctx->obj->options.unixcharset,
                                CH_UTF8,