[OpenAFS-devel] Window Client Patch

Dave Koziol dkoziol@dragonflymobile.com
Fri, 19 Jan 2001 10:47:35 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C08205.3BEBF260
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

The following patch is to addresses problems with the Drive Letters tabs in
the AFS Client and AFS Control Panel when using submounts which start with
the letters afs.  We had a test cell up and running with a name that started
with afs01 and this caused the afs client to misbehave.

Dave Koziol                  | koziol@dragonflymobile.com
Software Engineering Manager |
Dragonfly Mobile             | http://www.dragonflymobile.com

------=_NextPart_000_0000_01C08205.3BEBF260
Content-Type: application/octet-stream;
	name="drivemap.cpp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="drivemap.cpp"

*** c:\afs\openafs\src\winnt\client_config\drivemap.cpp	Tue Nov 07 =
15:44:17 2000
--- c:\openafs\src\winnt\client_config\drivemap.cpp	Thu Jan 18 19:54:40 =
2001
***************
*** 684,692 ****
        lstrcpy (pszTarget, (fWantAFS) ? TEXT("/afs") : TEXT(""));
     else if ((*pszSource !=3D TEXT('/')) && (*pszSource !=3D =
TEXT('\\')))
        wsprintf (pszTarget, TEXT("/afs/%s"), pszSource);
!    else if (fWantAFS && lstrncmpi (&pszSource[1], TEXT("afs"), 3))
        wsprintf (pszTarget, TEXT("/afs%s"), pszSource);
!    else if (!fWantAFS && !lstrncmpi (&pszSource[1], TEXT("afs"), 3))
        lstrcpy (pszTarget, &pszSource[4]);
     else
        lstrcpy (pszTarget, pszSource);
--- 684,697 ----
        lstrcpy (pszTarget, (fWantAFS) ? TEXT("/afs") : TEXT(""));
     else if ((*pszSource !=3D TEXT('/')) && (*pszSource !=3D =
TEXT('\\')))
        wsprintf (pszTarget, TEXT("/afs/%s"), pszSource);
!    // We don't want to strip afs off the start if it is part of =
something for example afscell.company.com
!    else if (fWantAFS && (lstrncmpi (&pszSource[1], TEXT("afs"), 3)) || =
!((pszSource[4] =3D=3D TEXT('/')) ||
!                                                                        =
  (pszSource[4] =3D=3D TEXT('\\')) ||
!                                                                        =
  (lstrlen(pszSource) =3D=3D 4)))
        wsprintf (pszTarget, TEXT("/afs%s"), pszSource);
!    else if (!fWantAFS && (!lstrncmpi (&pszSource[1], TEXT("afs"), 3) =
|| ((pszSource[4] =3D=3D TEXT('/')) ||
!                                                                        =
 (pszSource[4] =3D=3D TEXT('\\')) ||
!                                                                        =
 (lstrlen(pszSource) =3D=3D 4))))
        lstrcpy (pszTarget, &pszSource[4]);
     else
        lstrcpy (pszTarget, pszSource);

------=_NextPart_000_0000_01C08205.3BEBF260--