]> arthur.barton.de Git - netatalk.git/commitdiff
Use mac charset for volume name in getvolparams.
authordidg <didg>
Wed, 28 Sep 2005 10:19:34 +0000 (10:19 +0000)
committerdidg <didg>
Wed, 28 Sep 2005 10:19:34 +0000 (10:19 +0000)
etc/afpd/volume.c

index 606fc6433191d12c1fb4746a7f9fcd54e2ff8b43..a06e43909414f03e32c41165406a1b24aab62722 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.63 2005-07-20 22:28:46 didg Exp $
+ * $Id: volume.c,v 1.64 2005-09-28 10:19:34 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -1389,7 +1389,8 @@ int               *buflen;
     if ( nameoff ) {
         ashort = htons( data - buf );
         memcpy(nameoff, &ashort, sizeof( ashort ));
-       aint = ucs2_to_charset( (utf8_encoding()?CH_UTF8_MAC:vol->v_maccharset), vol->v_name, data+1, 255);
+        /* name is always in mac charset, FIXME mangle if length > 27 char */
+       aint = ucs2_to_charset( vol->v_maccharset, vol->v_name, data+1, 255);
        if ( aint <= 0 ) {
            *buflen = 0;
             return AFPERR_MISC;