解决内存泄漏问题
This commit is contained in:
parent
cec944a05a
commit
be5462597e
@ -1194,7 +1194,7 @@ int SqliteDB::QueryofflineData() {
|
|||||||
char whereCon[64] = {0};
|
char whereCon[64] = {0};
|
||||||
memset(whereCon, 0, 64);
|
memset(whereCon, 0, 64);
|
||||||
sprintf(whereCon, "dataNodeNo = '%s' and TimeStamp = '%s'", arrRetData[j][0].c_str(), arrRetData[j][8].c_str());
|
sprintf(whereCon, "dataNodeNo = '%s' and TimeStamp = '%s'", arrRetData[j][0].c_str(), arrRetData[j][8].c_str());
|
||||||
memcpy(updateSql, "sendMsg='1'", sizeof(updateSql));
|
memcpy(updateSql, "sendMsg='1'", 11);
|
||||||
res = sqlite_db_ctrl::instance().UpdateTableData(StaticTableName, updateSql, whereCon);
|
res = sqlite_db_ctrl::instance().UpdateTableData(StaticTableName, updateSql, whereCon);
|
||||||
if(res !=0 ){
|
if(res !=0 ){
|
||||||
zlog_error(zct, "res = %d", res);
|
zlog_error(zct, "res = %d", res);
|
||||||
|
|||||||
@ -397,7 +397,7 @@ std::string JsonData::JsonCmd_52() {
|
|||||||
char whereCon[512] = {};
|
char whereCon[512] = {};
|
||||||
std::string strTimeStamp = "";
|
std::string strTimeStamp = "";
|
||||||
char selectCon[128] = {0};
|
char selectCon[128] = {0};
|
||||||
memcpy(selectCon, "sendMsg = '0'", sizeof(selectCon));
|
memcpy(selectCon, "sendMsg = '0'", 13);
|
||||||
int count = sqlite_db_ctrl::instance().GetTableRows(T_DATASTATIC_INFO(TNAME), selectCon);
|
int count = sqlite_db_ctrl::instance().GetTableRows(T_DATASTATIC_INFO(TNAME), selectCon);
|
||||||
if (count < 1) {
|
if (count < 1) {
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@ -517,7 +517,7 @@ void Uart::DealDataNodeName(const char *pData) {
|
|||||||
std::string strTime = GetLocalTimeWithMs();
|
std::string strTime = GetLocalTimeWithMs();
|
||||||
char szShortAdd[8] = {0x00};
|
char szShortAdd[8] = {0x00};
|
||||||
char shortAdd[8] = {0x00};
|
char shortAdd[8] = {0x00};
|
||||||
char NodeName[64] = {0x00};
|
char NodeName[128] = {0x00};
|
||||||
sprintf(szShortAdd, "%02x%02x", pData[3] & 0xFF, pData[4] & 0xFF);
|
sprintf(szShortAdd, "%02x%02x", pData[3] & 0xFF, pData[4] & 0xFF);
|
||||||
memcpy(NodeName, &pData[7], 64);
|
memcpy(NodeName, &pData[7], 64);
|
||||||
memcpy(shortAdd, &pData[3], 2);
|
memcpy(shortAdd, &pData[3], 2);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user