提交 12da497e authored 作者: blu's avatar blu

getSn confliction

上级 7ca9e354
...@@ -378,10 +378,10 @@ togo_end: ...@@ -378,10 +378,10 @@ togo_end:
int ret = 0; int ret = 0;
int cnt = 0; int cnt = 0;
while(ret < 0 && cnt < 3) { do{
ret = getValue(info, LVDB_KEY_SN, fileName, _validateSn); ret = getValue(info, LVDB_KEY_SN, fileName, _validateSn);
cnt++; cnt++;
} }while(ret < 0 && cnt < 3);
if(ret < 0) { if(ret < 0) {
// read from text config // read from text config
......
...@@ -938,10 +938,14 @@ public: ...@@ -938,10 +938,14 @@ public:
// get sn of device // get sn of device
json info; json info;
try { try {
LVDB::getSn(info); ret = LVDB::getSn(info);
} }
catch(exception &e) { catch(exception &e) {
spdlog::error("evdaemon failed to get local info: {}", e.what()); spdlog::error("evdaemon failed to get local info: {}", e.what());
ret = -1;
}
if(ret != 0) {
spdlog::error("fatal error: evdaemon failed to get/set SN");
exit(1); exit(1);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论