From 5fa2a6c070cdd9030817d7b5d4d1d88cbb35a1d9 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 22 Oct 2010 15:49:50 +0000 Subject: [PATCH] 2010-10-22 17:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_os.prg + WIN_OSNETREGOK() extended to disable some SMB2 internal caches, which if left on default might cause db corruption on Vista and above systems. * include/hbnsctp.ch + Added comment that the file is used by C code. --- harbour/ChangeLog | 37 ++++++++++++++++++++------------ harbour/contrib/hbwin/win_os.prg | 6 ++++++ harbour/include/hbnsctp.ch | 2 ++ 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5d1f56efeb..f0b2cff703 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2010-10-22 17:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbwin/win_os.prg + + WIN_OSNETREGOK() extended to disable some SMB2 internal caches, + which if left on default might cause db corruption on Vista + and above systems. + + * include/hbnsctp.ch + + Added comment that the file is used by C code. + 2010-10-22 15:09 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/external/Makefile + harbour/external/hbpmcom @@ -105,23 +114,23 @@ * contrib/hbide/idemain.prg * contrib/hbide/idemisc.prg * contrib/hbide/ideprojmanager.prg - + Implemented: in-demand-since-begining feature to contain - anciallary files within the project tree but still keeping - compatibility with hbMK2. Also to have single project + + Implemented: in-demand-since-begining feature to contain + anciallary files within the project tree but still keeping + compatibility with hbMK2. Also to have single project file with all its contents intact, for GUI and command line interface. - + It is how it is achieved: a .hbp is loaded in HBP tab "as is" - except stripping the header part which is readded when the + except stripping the header part which is readded when the project is saved. The header part is comprised of : # # $Id$ # - + -3rd=hbide_* contents. - Rest whole of the on-disk contents of .hbp are made available - for editing. When a source is added via Add button, it is checked + Rest whole of the on-disk contents of .hbp are made available + for editing. When a source is added via Add button, it is checked if it is a compilable source. If not then "-3rd=file=" + filename is added at the bottom. @@ -130,8 +139,8 @@ If any is missing, please shout. TODO: user defined list of extentions for this purpose. - The project tree is now more organized and is listed sorted - on extention and filename. User can easily locate the source + The project tree is now more organized and is listed sorted + on extention and filename. User can easily locate the source of interest and click to bring it into the editor. Please test extensively, I might have left new bugs for sure. @@ -159,13 +168,13 @@ 2010-10-21 14:10 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/src/rtl/hbnsctp.c - * added type casting and local variable initialization to make some + * added type casting and local variable initialization to make some compilers happy 2010-10-21 03:18 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/hbmysql/hbmysql.hbp * harbour/contrib/sddmy/sddmy.hbp - * added alternative mysql library path + * added alternative mysql library path + harbour/include/hbnsctp.ch + harbour/include/hbnsctp.h * harbour/src/rtl/Makefile @@ -174,8 +183,8 @@ + added NSCTP (Not Stream Control Transfer Protocol) functions. Both C and PRG interfaces functions provided. ; Idea, protocol description, name, function description, samples - are presented at the beginning of hbnsctph.c file. I only put - function syntax here to help ChangeLog be a source of + are presented at the beginning of hbnsctph.c file. I only put + function syntax here to help ChangeLog be a source of documentation: hb_nsctpCreate( hSocket ) --> hNSCTP hb_nsctpDestroy( hNSTP ) diff --git a/harbour/contrib/hbwin/win_os.prg b/harbour/contrib/hbwin/win_os.prg index cddc5c0136..6e2f4b6d72 100644 --- a/harbour/contrib/hbwin/win_os.prg +++ b/harbour/contrib/hbwin/win_os.prg @@ -110,6 +110,12 @@ FUNCTION WIN_OSNETREGOK( lSetIt, lDoVista ) bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "UtilizeNtCaching", 0, lSetIt ) bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "UseLockReadUnlock", 0, lSetIt ) + IF hb_osIsWinVista() + bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "FileInfoCacheLifetime", 0, lSetIt ) + bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "FileNotFoundCacheLifetime", 0, lSetIt ) + bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "DirectoryCacheLifetime", 0, lSetIt ) + ENDIF + IF hb_osIsWin2K() bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Services\MRXSmb\Parameters", "OpLocksDisabled", 1, lSetIt ) ENDIF diff --git a/harbour/include/hbnsctp.ch b/harbour/include/hbnsctp.ch index 6680663fb6..04887da54a 100644 --- a/harbour/include/hbnsctp.ch +++ b/harbour/include/hbnsctp.ch @@ -50,6 +50,8 @@ * */ +/* NOTE: This file is also used by C code. */ + #ifndef HB_NSCTP_CH_ #define HB_NSCTP_CH_