From 6f0fb6204395d127df0e02e97cea2c17c6d27851 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 12 Feb 2012 00:11:52 +0900 Subject: [PATCH] Made session_id_seed global --- examples/spdyd.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/spdyd.cc b/examples/spdyd.cc index 959ceb7c..2e4b40ea 100644 --- a/examples/spdyd.cc +++ b/examples/spdyd.cc @@ -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 {