diff --git a/src/WINNT/client_config/drivemap.cpp b/src/WINNT/client_config/drivemap.cpp index 83001128d9..9600bfe64f 100644 --- a/src/WINNT/client_config/drivemap.cpp +++ b/src/WINNT/client_config/drivemap.cpp @@ -17,9 +17,11 @@ extern "C" { #include #include #include +#undef REALLOC #include "drivemap.h" #include #include +#define DEBUG_VERBOSE #include /* @@ -632,16 +634,6 @@ BOOL ActivateDriveMap (TCHAR chDrive, LPTSTR pszMapping, LPTSTR pszSubmountReq, TCHAR szRemote[ MAX_PATH ]; wsprintf (szRemote, TEXT("\\\\%s\\%s"), szClient, szSubmount); - NETRESOURCE Resource; - memset (&Resource, 0x00, sizeof(NETRESOURCE)); - Resource.dwScope = RESOURCE_GLOBALNET; - Resource.dwType = RESOURCETYPE_DISK; - Resource.dwDisplayType = RESOURCEDISPLAYTYPE_SHARE; - Resource.dwUsage = RESOURCEUSAGE_CONNECTABLE; - Resource.lpLocalName = szLocal; - Resource.lpRemoteName = szRemote; - - // DWORD rc = WNetAddConnection2 (&Resource, NULL, NULL, ((fPersistent) ? CONNECT_UPDATE_PROFILE : 0)); DWORD rc=MountDOSDrive(chDrive,szSubmount,fPersistent); if (rc == NO_ERROR) return TRUE; @@ -940,10 +932,8 @@ void DoUnMapShare(BOOL drivemap) //disconnect drivemap { if (drivemap) DisMountDOSDrive(*lpnrLocal[i].lpLocalName); - //WNetCancelConnection(lpnrLocal[i].lpLocalName,TRUE); } else DisMountDOSDriveFull(lpnrLocal[i].lpRemoteName); - //WNetCancelConnection(lpnrLocal[i].lpRemoteName,TRUE); DEBUG_EVENT1("AFS DriveUnMap","UnMap-Remote=%x",res); } } @@ -986,13 +976,13 @@ BOOL DoMapShareChange() if (strstr(_strlwr(lpnrLocal[i].lpRemoteName),szPath)==NULL) continue; //only look at real afs mappings CHAR * pSubmount=strrchr(lpnrLocal[i].lpRemoteName,'\\')+1; - if (strcmpi(pSubmount,"all")==0) + if (lstrcmpi(pSubmount,"all")==0) continue; // do not remove 'all' for (DWORD j=0;j