* contrib/hbcurl/hbcurl.hbp
+ added Windows architecture specific libcurl names:
libcurl-x64.dll, libcurl-arm64.dll as suggested
by @carles9000 in #382
* contrib/hbcurl/core.c
! declare buffer for CURLOPT_ERRORBUFFER as 'char *' instead of
'unsigned char *', the exact buffer type is chcked in typecheck-gcc.h
and 'unsigned char *' does not pass this test
; QUESTION:
Why curl_easy_setopt( <pCurl>, HB_CURLOPT_ER_BUFF_SETUP, [<nBufSize>] )
accepts <nBufSize> parameter?
Buffer smaller then CURL_ERROR_SIZE means GPF and larger waste of memory.
The only acceptable value for <nBufSize> is CURL_ERROR_SIZE.
The allocate buffer should be initialized with '\0' otherwise we will
have other GPF trap when user call curl_easy_er_buff_get() before any
error is set. This bug was fixed in CURL 7.60.0.
* contrib/hbcurl/core.c
* contrib/hbcurl/hbcurl.ch
* contrib/hbcurl/hbcurl.hbx
* applied more cleanups, following Viktor Szakats guidance in hisrepo:
6127603217
- add `HB_CURLM_ERROR` to indicate error in hbcurl wrapper.
- replace use of `HB_CURLM_INTERNAL_ERROR` with `HB_CURLM_ERROR`.
- sync Harbour variable integer sizes with curl ones.
- tidy up a variable scopes.
- drop unused variable.
- omit `hb_ret()` (it's a no-op).
- formatting.
- add functions to `hbcurl.hbx`.
+ add curl_ws_send()/curl_ws_recv() - WebSocket connectivity,
borrowed from Viktor's fork, thanks again!
2c71a5c940
* src/rdd/dbcmd.c
* note about C5.3 and Harbour extensions to
DBAPPEND( [<lUnlockAll>=.t.] ), thanks Viktor
* ChangeLog.txt
! typos
* contrib/hbcurl/hbcurl.ch
* updated HB_CURLOPT_SSL_OPTIONS: HB_CURLSSLOPT_*
+ added HB_CURLMSG_RESP_HANDLE, HB_CURLMSG_RESP_HPOS
mappings of array elements returned by
curl_multi_info_read( <hMulti>[, <aHandles> ]) -> <aResults>
* contrib/hbcurl/core.c
* adapted @emazv72 contribution from:
https://github.com/vszakats/hb/pull/344
Many thanks, it could be useful for managing multiple transfers,
by extending some kind of Inkey() loop or in many other
scenarios.
+ added curl lib version guards
* minor code and code formattings
+ extended function
curl_multi_info_read( <hMulti>[, <aHandles> ]) -> <aResults>
with a possibility to return real GC pointer of specific
transfer related to reported event. <aHandles> should be
specified if this is expected.
+ contrib/hbcurl/tests/multi.prg
+ demo of the additions
* contrib/hbcurl/core.c
* contrib/hbcurl/hbcurl.ch
+ added HB_CURLOPT_XFERINFODATA and HB_CURLOPT_XFERINFOFUNCTION
! use CURLOPT_XFERINFO* instead of depreciated CURLOPT_PROGRESS*
to implement HB_CURLOPT_PROGRESSBLOCK
! do not use depreciated CURLOPT_RANDOM_FILE and CURLOPT_EGDSOCKET,
they serve no purpose anymore
+ added macros for new protocols
+ added HB_CURLOPT_PROTOCOLS_STR and HB_CURLOPT_REDIR_PROTOCOLS_STR
! use CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR instead
of depreciated CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS
* emulate CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS using
CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR in new curl
versions
+ added support for HB_CURLOPT_MIMEPOST
! use CURLOPT_MIMEPOST to emulate depreciated in new curl versions
CURLOPT_HTTPPOST
+ added support for HB_CURLOPT_PROXY_SERVICE_NAME
! use CURLOPT_PROXY_SERVICE_NAME to emulate depreciated in new curl
versions CURLOPT_SOCKS5_GSSAPI_SERVICE
+ added HB_CURLINFO_ACTIVESOCKET
! use CURLINFO_ACTIVESOCKET instead of depreciated CURLINFO_LASTSOCKET
+ added HB_CURLINFO_SIZE_UPLOAD_T, HB_CURLINFO_SIZE_DOWNLOAD_T,
HB_CURLINFO_SPEED_DOWNLOAD_T, HB_CURLINFO_SPEED_UPLOAD_T,
HB_CURLINFO_CONTENT_LENGTH_DOWNLOAD_T and
HB_CURLINFO_CONTENT_LENGTH_UPLOAD_T
! use CURLINFO_*_T actions instead of depreciated ones which operate
double as file offset and emulate old actions using new ones in
new curl versions
* contrib/hbssl/evp.c
! Do no use EVP_cleanup() in OpenSSL 1.1.0 and newer.
It no longer has any effect.
* contrib/hbssl/hbssl.h
* set OPENSSL_API_COMPAT to 1.2.0 to pacify OpenSSL 3.0 API.
It hides OpenSSL 3.0 warnings but we should update the code to use
new suggested API.
* contrib/hbwin/olecore.c
! invoke assign methods with DISPATCH_PROPERTYPUTREF instead of
DISPATCH_PROPERTYPUT if assigned value is OLE object. If such
functionality is not implemented by the object (some OLE
implementations do not support it and returns DISP_E_MEMBERNOTFOUND)
then call it again but in previous form with DISPATCH_PROPERTYPUT
* include/hbapirdd.h
* src/rdd/dbcmd.c
! fixed error codes set by DbSetRelations() to be Cl*pper compatible
* src/rdd/dbcmd.c
+ accept symbol items in Select() and DbSelectArea() just like in
( <alias> ) -> <exp>
* include/hbcompdf.h
* include/hbexprb.c
* src/common/funcid.c
+ added compile time optimization for Select() function without parameters
+ added compile time optimization DbSelectArea( <nNum> | <sSym> )
+ added support for hb_PIsByRef( @localVarName ) -> <lPassedByRef>
When the parameter is passed by reference Harbour verifies if it's
existing local variable and change it to its index in parameter list
so effectively it works like hb_IsByRef( @localVarName ) in xHarbour
* contrib/xhb/hbcompat.ch
+ added translations for
hb_PIsByRef( @<localVar> ) <=> hb_IsByRef( @<localVar> )
* contrib/hbcurl/core.c
! use hb_vmPushString() instead of hb_vmPushStringPcode()
hb_vmPushStringPcode() is only for static buffer which cannot be freed.
Variables passed to PRG debug functions can be stored by PRG code in
other variables which lives longer then passed buffer and later cause
GPF when curls structure is freed.
! indenting
* contrib/hbcurl/core.c
! CURLOPT_MAXLIFETIME_CONN is available in curl 7.80.0,
fix older builds by adding a version check
* ChangeLog.txt
* entry for previous merge was "old" (i wouldn't touch
it alone), but it also had paths with backslashes
in place of slashes
* contrib\hbcurl\hbcurl.ch
* contrib\hbcurl\core.c
+ added HB_CURLOPT_MAXLIFETIME_CONN to setup max lifetime of connection
see https://curl.se/libcurl/c/CURLOPT_MAXLIFETIME_CONN.html for more
information.
2022-05-02 08:38 UTC+0200 Antonino Perricone
* contrib\hbcurl\core.c
+ added HB_CURLOPT_DEBUGBLOCK to setup a block for debug information
It takes a callback in the form of {|type, msg| ... }
see https://curl.se/libcurl/c/CURLOPT_DEBUGFUNCTION.html for more
information.
* contrib\hbcurl\hbcurl.ch
+ added HB_CURLINFOTYPE_* macros for debug block
* contrib/hbssl/hbssl.hbp
* added import libraries to link with OpenSSL current version
* contrib/hbcurl/hbcurl.hbp
* added import libraries to link with cUrl current version
* contrib/hbwin/wapi_winuser_1.c
* contrib/hbwin/hbwin.hbx
* added wapi_ShowWindow() wrapper
* *
% remove brandings and homepage [1] from copyright header. Pass 1 - using script.
[1] nobody has access to it anymore AFAIK - and it's also just
a redirect since long
! update url in copyright header
; this should make the diff between 3.4 and 3.2 easier to manage
* src/rtl/filebuf.c
! unlock HVM stack before locking local mutex and calling hb_fs*()
functions which also unlocks HVM. It fixes possible deadlock condition
when hb_gcAll( .T. ) is executed.
* include/hbapi.h
* src/vm/garbage.c
! changed mark function semantic.
Adding support for user defined mark function I created race condition
in MT GC code. It happens because blocks marked as deleted were not
scanned by GC mark code so their subitems where not accessible.
To fix it we have to change mark function semantic. Now mark function
can be executed also for blocks currently deleted. It means that GC
block destructor should clean references to just removed items and
subblocks. The best place to make it is clearing pointers to GC blocks
just after hb_itemRelease() or hb_gcRefFree().
It is save to clean the reference just before hb_itemRelease() or
hb_gcRefFree() but only for the single block passed to these functions.
It is not save to clear reference to more then one block and then
execute above functions.
+ check reference count after destructor execution for all blocks
not only arrays - warning it may exploit some wrong C code.
- removed not longer used hb_gcRefCheck() function.
* include/hbvm.h
* src/vm/hvm.c
+ added new internal function hb_vmLockForce()
! fixed to mark GC blocks with active threads
* src/vm/thread.c
* include/hbthread.h
% modified sync mutexes used by xBase++ signal class emulation
to not use item array internally
* updated mutex destructor to new GC mark semantic
! mark GT items if GT is bound with thread item
! fixed mutex notify/subscribe code to not change GC items
when HVM stack is unlocked
! use hb_vmLockForce() to eliminate potential deadlock
+ added new C function hb_threadEnterCriticalSectionGC().
It should be used instead of hb_threadEnterCriticalSection()
in code which manipulates GC items inside critical section.
It's slower but eliminates possible deadlock condition.
Please remember that remember that both functions cannot
be used for the same mutex. So if it's necessary to use
hb_threadEnterCriticalSectionGC() in one place then it
has to be used in all others when the same mutex is locked.
* src/vm/arrays.c
* src/vm/codebloc.c
* src/vm/hashes.c
* src/rtl/hbgtcore.c
* contrib/hbcurl/core.c
* contrib/hbexpat/core.c
* updated destructors to new GC mark semantic
* contrib/hbxpp/dllx.c
! fixed destructor for pointer item created by DllPrepareCall()
Now it respects reference counter.
; added note about real behavior of library handle destructor,
I haven't changed existing code behavior but maybe it should
be done.
* contrib/xhb/hbserv.c
* src/debug/dbgentry.c
* src/rdd/wacore.c
! fixed possible deadlocks by using hb_threadEnterCriticalSectionGC()
instead of hb_threadEnterCriticalSection().
* contrib/hbmemio/memio.c
! slightly modified hb_memfsDirectory() code to avoid race condition
without using hb_threadEnterCriticalSectionGC()
* src/vm/fm.c
% reduce the lock range in HB_FM_STAT builds
* src/rtl/hbsocket.c
! added missing HVM stack unlocking in hb_socketSelect() function
* src/rtl/gtxwc/gtxwc.c
! added few missing locks for version compiled with HB_XWC_XLIB_NEEDLOCKS
* src/rdd/dbtotal.prg
* allow to use symbols instead of codeblocks
* modified Harbour extension which uses ordKey() as default group
signature to work also without index. In such case all records
are summarized into single one.
; Most of above modifications were critical for stability of MT programs.
They should allow to activate GC in any place.
* (all files)
* stripped svn header
* minor cleanups
; use following command to find out the history of files:
git log
git log --follow
git blame
git annotate