From: Maxim Mamontov Date: Tue, 10 May 2011 12:54:13 +0000 (+0300) Subject: Fix rnd type in USER X-Git-Tag: 2.407-p1~16 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/3e979f58a2fd02e52ea45284ca1043e9e306a576?ds=inline;hp=7897474c8a3fb975cc0bcda45e40c47d58959ea6 Fix rnd type in USER --- diff --git a/projects/sgauthstress/user.h b/projects/sgauthstress/user.h index 150bf242..0bf53345 100644 --- a/projects/sgauthstress/user.h +++ b/projects/sgauthstress/user.h @@ -5,6 +5,7 @@ #include #include "stg/os_int.h" +#include "stg/blowfish.h" class USER { public: @@ -18,15 +19,15 @@ class USER { uint32_t GetAliveTimeout() const { return aliveTimeout; } uint32_t GetUserTimeout() const { return userTimeout; } int GetPhase() const { return phase; } - int GetRnd() const { return rnd; } + uint32_t GetRnd() const { return rnd; } int GetSocket() const { return sock; } time_t GetPhaseChangeTime() const { return phaseChangeTime; } BLOWFISH_CTX * GetCtx() { return &ctx; } void SetPhase(int p) { phase = p; time(&phaseChangeTime); } - void SetRnd(int r) { rnd = r; } - int IncRnd() { return ++rnd; } + void SetRnd(uint32_t r) { rnd = r; } + uint32_t IncRnd() { return ++rnd; } void SetAliveTimeout(uint32_t timeout) { aliveTimeout = timeout; } void SetUserTimeout(uint32_t timeout) { userTimeout = timeout; } @@ -38,7 +39,7 @@ class USER { uint32_t userTimeout; int phase; time_t phaseChangeTime; - int rnd; + uint32_t rnd; int sock; BLOWFISH_CTX ctx; };