From 6c9e79e8caeac4eb586c65062e4017e80cfaee34 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 9 Mar 2012 21:34:50 +0900 Subject: [PATCH] Use SPDY/3 name in spdylay_settings_flag. Added SPDYLAY_SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE. --- lib/includes/spdylay/spdylay.h | 8 +++++--- tests/spdylay_frame_test.c | 6 ++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/includes/spdylay/spdylay.h b/lib/includes/spdylay/spdylay.h index ee97f00d..7362a678 100644 --- a/lib/includes/spdylay/spdylay.h +++ b/lib/includes/spdylay/spdylay.h @@ -128,7 +128,7 @@ typedef enum { typedef enum { SPDYLAY_FLAG_SETTINGS_NONE = 0, - SPDYLAY_FLAG_SETTINGS_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS = 1 + SPDYLAY_FLAG_SETTINGS_CLEAR_SETTINGS = 1 } spdylay_settings_flag; typedef enum { @@ -144,11 +144,13 @@ typedef enum { SPDYLAY_SETTINGS_MAX_CONCURRENT_STREAMS = 4, SPDYLAY_SETTINGS_CURRENT_CWND = 5, SPDYLAY_SETTINGS_DOWNLOAD_RETRANS_RATE = 6, - SPDYLAY_SETTINGS_INITIAL_WINDOW_SIZE = 7 + SPDYLAY_SETTINGS_INITIAL_WINDOW_SIZE = 7, + /* This first appeared in SPDY/3 */ + SPDYLAY_SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE = 8 } spdylay_settings_id; /* Maximum ID of spdylay_settings_id. */ -#define SPDYLAY_SETTINGS_MAX 7 +#define SPDYLAY_SETTINGS_MAX 8 /* Default maximum concurrent streams */ #define SPDYLAY_CONCURRENT_STREAMS_MAX 100 diff --git a/tests/spdylay_frame_test.c b/tests/spdylay_frame_test.c index b0bc74d2..251ce098 100644 --- a/tests/spdylay_frame_test.c +++ b/tests/spdylay_frame_test.c @@ -461,8 +461,7 @@ void test_spdylay_frame_pack_settings_version(uint16_t version) iv[2].value = 65536; spdylay_frame_settings_init - (&frame.settings, version, - SPDYLAY_FLAG_SETTINGS_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS, + (&frame.settings, version, SPDYLAY_FLAG_SETTINGS_CLEAR_SETTINGS, spdylay_frame_iv_copy(iv, 3), 3); framelen = spdylay_frame_pack_settings(&buf, &buflen, &frame.settings); CU_ASSERT(8+4+3*8 == framelen); @@ -475,8 +474,7 @@ void test_spdylay_frame_pack_settings_version(uint16_t version) CU_ASSERT(version == oframe.settings.hd.version); CU_ASSERT(SPDYLAY_SETTINGS == oframe.settings.hd.type); - CU_ASSERT(SPDYLAY_FLAG_SETTINGS_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS == - oframe.settings.hd.flags); + CU_ASSERT(SPDYLAY_FLAG_SETTINGS_CLEAR_SETTINGS == oframe.settings.hd.flags); CU_ASSERT(framelen-SPDYLAY_FRAME_HEAD_LENGTH == oframe.settings.hd.length); CU_ASSERT(3 == oframe.settings.niv);