X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/6303b0ef86435d3485965c1f30dc7af3f6b19384..015efefb3fcbf0613cefc6826eb92c0f4aec25f0:/projects/stargazer/plugins/store/mysql/mysql_store.cpp diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index fefadd5c..e9f529c6 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -118,7 +118,7 @@ public: //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -BASE_STORE * GetStore() +STORE * GetStore() { return msc.GetStore(); } @@ -711,6 +711,13 @@ if (!(res=mysql_store_result(sock))) return -1; } +if (mysql_num_rows(res) != 1) +{ + errorStr = "User not found"; + mysql_close(sock); + return -1; +} + row = mysql_fetch_row(res); string param; @@ -797,7 +804,7 @@ try { i = StrToIPS(ipStr); } -catch (string s) +catch (const string & s) { mysql_free_result(res); errorStr = "User \'" + login + "\' data not read. Parameter IP address. " + s;