From: didg Date: Wed, 28 Sep 2005 09:53:47 +0000 (+0000) Subject: Always use the mac charset for the volume name in getvolparms, from HAT. X-Git-Tag: netatalk-2-0-4-beta1~63 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a44125b1542b2a2d8937e0f8b23d9fad7bb26bf;hp=4acd385ddb7722553322926e2f328b5c6b723f32;p=netatalk.git Always use the mac charset for the volume name in getvolparms, from HAT. --- diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index 71c9c117..bc11c4d0 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -1,5 +1,5 @@ /* - * $Id: volume.c,v 1.51.2.7.2.33.2.9 2005-09-27 10:40:41 didg Exp $ + * $Id: volume.c,v 1.51.2.7.2.33.2.10 2005-09-28 09:53:47 didg Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -1407,7 +1407,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;