From: Jeffrey Altman Date: Fri, 11 Sep 2009 15:54:27 +0000 (-0400) Subject: Windows: Handle "(Default)" regsitry value in MountGlobalDrivesThread X-Git-Tag: openafs-devel-1_5_63~11 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c1c8da78b680964b0259266207b2c07df54b5ef1;p=packages%2Fo%2Fopenafs.git Windows: Handle "(Default)" regsitry value in MountGlobalDrivesThread In MountGlobalDrivesThread(), if the "(Default)" registry value is defined that should be interpreted as a drive mapping to a device with no name. This is specified using NULL instead of the nul-string. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/446 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/afsd_service.c b/src/WINNT/afsd/afsd_service.c index 31adc14f9..2b7298a9a 100644 --- a/src/WINNT/afsd/afsd_service.c +++ b/src/WINNT/afsd/afsd_service.c @@ -467,7 +467,7 @@ static DWORD __stdcall MountGlobalDrivesThread(void * notUsed) nr.dwScope = RESOURCE_GLOBALNET; /* ignored parameter */ nr.dwType=RESOURCETYPE_DISK; - nr.lpLocalName=szDriveToMapTo; + nr.lpLocalName=strlen(szDriveToMapTo) > 0 ? szDriveToMapTo : NULL; nr.lpRemoteName=szAfsPath; nr.dwDisplayType = RESOURCEDISPLAYTYPE_SHARE; /* ignored parameter */ nr.dwUsage = RESOURCEUSAGE_CONNECTABLE; /* ignored parameter */