Parcourir la source

change some code in server_fwadmin. not complete.

yuchuli il y a 1 an
Parent
commit
da128a8e9b
1 fichiers modifiés avec 9 ajouts et 1 suppressions
  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;
 }