Modifica a test_share
git-svn-id: svn://10.65.10.50/trunk@3 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d88402033a
commit
ed742ea403
@ -59,25 +59,24 @@ semres : flag per l'ok delle operazioni sui semafori
|
|||||||
BOOLEAN test_share()
|
BOOLEAN test_share()
|
||||||
|
|
||||||
{
|
{
|
||||||
static BOOLEAN share_active = TRUE;
|
|
||||||
#ifdef DOS
|
#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);
|
share_active = CGetAut(MUAUT);
|
||||||
if (share_active)
|
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;
|
share_active = f != -1;
|
||||||
if (f != -1) close(f);
|
if (f != -1) close(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return share_active;
|
return share_active;
|
||||||
|
#else
|
||||||
|
return TRUE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user