1. 返回合适的错误标识

This commit is contained in:
2024-10-31 15:29:13 +08:00
parent 8afb72cab6
commit 763376a95c
3 changed files with 9 additions and 3 deletions

View File

@@ -60,6 +60,8 @@ char *CheckTimeRegionWithMonth(void *PtrHIKNvr, int year, int month) {
if (nRet == 0) {
res = HIKNvrObj->TimeToJson(select_time, &available_date_vec).dump();
}else{
res = "";
}
char *cString = new char[res.size() + 1];
std::strcpy(cString, res.c_str());
@@ -77,6 +79,8 @@ char *CheckTimeRegionWithDay(void *PtrHIKNvr, int year, int month, int day) {
int nRet = HIKNvrObj->CheckTimeRegionWithDay(select_time, available_time_vec);
if (nRet == 0) {
res = HIKNvrObj->TimeToJsonInDay(select_time, &available_time_vec).dump();
}else{
res = "";
}
char *cString = new char[res.size() + 1];
std::strcpy(cString, res.c_str());