소스 검색

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;
 }