From 9c457d9aee148741ea438b05d3ce8177ca90055e Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Mon, 8 Nov 2010 12:24:54 +0200 Subject: [PATCH] =?utf8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?utf8?q?=D0=BD=D0=BE=20=D0=BD=D0=B5=D1=8D=D1=84=D1=84=D0=B5=D0=BA=D1=82?= =?utf8?q?=D0=B8=D0=B2=D0=BD=D0=BE=D0=B5=20=D0=B2=D1=8B=D1=87=D0=B8=D1=82?= =?utf8?q?=D1=8B=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=B0=D0=BD=D0=BD?= =?utf8?q?=D1=85=20=D0=BE=20=D1=82=D1=80=D0=B0=D1=84=D0=B8=D0=BA=D0=B5=20?= =?utf8?q?=D0=BF=D0=BE=20=D0=BD=D0=B0=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?utf8?q?=D0=BD=D0=B8=D1=8F=D0=BC,=20=20=20=20=20=D0=BF=D1=80=D0=BE=D0=B2?= =?utf8?q?=D0=B5=D0=B4=D0=B5=D0=BD=D1=8B=20=D1=88=D0=B0=D0=BC=D0=B0=D0=BD?= =?utf8?q?=D1=81=D0=BA=D0=B8=D0=B5=20=D0=BE=D0=B1=D1=80=D1=8F=D0=B4=D1=8B?= =?utf8?q?=20=D1=81=20=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BE?= =?utf8?q?=D1=87=D0=BD=D1=8B=D0=BC=D0=B8=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0?= =?utf8?q?=D0=BC=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../stargazer/plugins/store/mysql/mysql_store.cpp | 11 +++++------ projects/stargazer/plugins/store/mysql/mysql_store.h | 11 ++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index 102be151..94503c78 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -855,30 +855,29 @@ row = mysql_fetch_row(res); unsigned int startPos=0; char s[22]; -uint64_t traffU[DIR_NUM]; -uint64_t traffD[DIR_NUM]; for (int i = 0; i < DIR_NUM; i++) { + uint64_t traff; sprintf(s, "D%d", i); - if (GetULongLongInt(row[startPos+i*2],&traffD[i], 0) != 0) + if (GetULongLongInt(row[startPos+i*2], &traff, 0) != 0) { mysql_free_result(res); errorStr = "User \'" + login + "\' stat not read. Parameter " + string(s); mysql_close(sock); return -1; } - stat->down = traffD; + stat->down[i] = traff; sprintf(s, "U%d", i); - if (GetULongLongInt(row[startPos+i*2+1], &traffU[i], 0) != 0) + if (GetULongLongInt(row[startPos+i*2+1], &traff, 0) != 0) { mysql_free_result(res); errorStr = "User \'" + login + "\' stat not read. Parameter " + string(s); mysql_close(sock); return -1; } - stat->up = traffU; + stat->up[i] = traff; }//for startPos += (2*DIR_NUM); diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.h b/projects/stargazer/plugins/store/mysql/mysql_store.h index 83a30e6a..649cb858 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.h +++ b/projects/stargazer/plugins/store/mysql/mysql_store.h @@ -1,18 +1,19 @@ /* - $Revision: 1.4 $ - $Date: 2010/01/19 11:07:57 $ + $Revision: 1.5 $ + $Date: 2010/10/07 19:45:52 $ */ -#ifndef FILE_STORE_H -#define FILE_STORE_H +#ifndef MYSQL_STORE_H +#define MYSQL_STORE_H + +#include #include #include "base_settings.h" #include "base_store.h" #include "user_traff.h" -#include using namespace std; //----------------------------------------------------------------------------- -- 2.44.2