From ed742ea403a75aa1f3c22b4b71b24cb0c2e41d47 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 12 Aug 1994 13:52:01 +0000 Subject: [PATCH] Modifica a test_share git-svn-id: svn://10.65.10.50/trunk@3 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/ccustio.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/include/ccustio.c b/include/ccustio.c index 6bd71543d..918dce2c4 100755 --- a/include/ccustio.c +++ b/include/ccustio.c @@ -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 }