From ebd3dc9dcceb6461ad2d08ec8dd23721ecd628ca Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 29 Jan 2012 02:00:03 +0900 Subject: [PATCH] Fixed bug that unique_id is not incremented by 2. --- lib/spdylay_session.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spdylay_session.c b/lib/spdylay_session.c index e1401064..1bad46b4 100644 --- a/lib/spdylay_session.c +++ b/lib/spdylay_session.c @@ -1339,6 +1339,7 @@ ssize_t spdylay_session_pack_data_overwrite(spdylay_session *session, uint32_t spdylay_session_get_next_unique_id(spdylay_session *session) { + uint32_t ret_id; if(session->next_unique_id > SPDYLAY_MAX_UNIQUE_ID) { if(session->server) { session->next_unique_id = 2; @@ -1346,5 +1347,7 @@ uint32_t spdylay_session_get_next_unique_id(spdylay_session *session) session->next_unique_id = 1; } } - return session->next_unique_id++; + ret_id = session->next_unique_id; + session->next_unique_id += 2; + return ret_id; }