浏览代码

change some code in server_fwadmin. not complete.

yuchuli 1 年之前
父节点
当前提交
da128a8e9b
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      src/tool/server_fwupdate/fwdb.cpp

+ 9 - 1
src/tool/server_fwupdate/fwdb.cpp

@@ -253,7 +253,7 @@ int fwdb::QueryUser(std::string strusername,std::string & strvalidtime, std::str
         std::cout<<query.lastError().text().toLatin1().data()<<std::endl;
         strerrorcode = "SQL Error.";
         mmutexdb.unlock();
-        return 0;
+        return -1;
     }
     else
     {
@@ -265,8 +265,16 @@ int fwdb::QueryUser(std::string strusername,std::string & strvalidtime, std::str
             return 1;
 
         }
+        else
+        {
+            strerrorcode = "No this user.";
+            mmutexdb.unlock();
+            return 0;
+        }
     }
 
+    mmutexdb.unlock();
+
     strerrorcode = "No this user.";
     return 0;
 }