Bug in Dahua SDK for CLIENT_DownloadByRecordFile

csJosh

n3wb
Joined
May 4, 2023
Messages
26
Reaction score
23
Location
United States
On the off chance that anyone on this forum has a line to Dahua tech folks or this helps someone else:

There's a bug in the General_NetSDK_Eng_Linux64_IS_V3.057.0000002.0.R.230814, in the dhnetsdk.h file. I believe the declarations of the CLIENT_DownloadByRecordFile and CLIENT_DownloadByRecordFileEx functions both are missing a final parameter, bUseUTC.
The logging facility shows the functions are expecting the argument and without the correction to the header file, the compiler doesn't populate space for the var on the stack, so the shared library reads garbage, which results in the requested downloads not happening sometimes.
Maybe this will help someone else working with the SDK.

The work-around is to download the SDK, edit the dhnetsdk.h file, and add a , unsigned char bUseUTC = 0 as the last argument to each of the two functions. Then recompile your code.

-Josh
 
Last edited:
Top