Modifica a test_share

git-svn-id: svn://10.65.10.50/trunk@3 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-08-12 13:52:01 +00:00
parent d88402033a
commit ed742ea403

View File

@ -59,25 +59,24 @@ semres : flag per l'ok delle operazioni sui semafori
BOOLEAN test_share()
{
static BOOLEAN share_active = TRUE;
#ifdef DOS
static BOOLEAN to_test = TRUE;
static BOOLEAN share_active = 2;
if (to_test)
if (share_active == 2)
{
to_test = FALSE;
share_active = CGetAut(MUAUT);
if (share_active)
{
int f = sopen("net.ini", O_RDONLY, SH_DENYNO, S_IREAD);
int f = open("net.ini", O_RDONLY, SH_DENYNO, S_IREAD);
share_active = f != -1;
if (f != -1) close(f);
}
}
#endif
return share_active;
#else
return TRUE;
#endif
}