Made session_id_seed global

This commit is contained in:
Tatsuhiro Tsujikawa 2012-02-12 00:11:52 +09:00
parent fee4a205a6
commit 6f0fb62043
1 changed files with 5 additions and 3 deletions

View File

@ -727,9 +727,12 @@ private:
int64_t session_id_;
};
// Global
int64_t session_id_seed = 0;
class ListenEventHandler : public EventHandler {
public:
ListenEventHandler(int fd) : fd_(fd), session_id_seed_(0) {}
ListenEventHandler(int fd) : fd_(fd) {}
virtual ~ListenEventHandler()
{
close(fd_);
@ -773,7 +776,7 @@ private:
return;
}
SSLAcceptEventHandler *hd = new SSLAcceptEventHandler(cfd, ssl,
++session_id_seed_);
++session_id_seed);
if(sessions->add_poll(hd) == -1) {
delete hd;
SSL_free(ssl);
@ -784,7 +787,6 @@ private:
}
int fd_;
int64_t session_id_seed_;
};
namespace {