Move NGHTTP2_PRI_* to nghttp2.h, fix too small pri data type in src

This commit is contained in:
Tatsuhiro Tsujikawa 2013-07-20 01:59:43 +09:00
parent 8b3a3efadc
commit 94258cd0b8
5 changed files with 11 additions and 10 deletions

View File

@ -45,6 +45,13 @@ struct nghttp2_session;
*/
typedef struct nghttp2_session nghttp2_session;
/**
* @macro
* default priority value
*/
#define NGHTTP2_PRI_DEFAULT (1 << 30)
#define NGHTTP2_PRI_LOWEST ((1U << 31) - 1)
/**
* @enum
*

View File

@ -33,13 +33,6 @@
#include "nghttp2_hd.h"
#include "nghttp2_buffer.h"
/**
* @macro
* default priority value
*/
#define NGHTTP2_PRI_DEFAULT (1 << 30)
#define NGHTTP2_PRI_LOWEST ((1U << 31) - 1)
#define NGHTTP2_MAX_FRAME_SIZE ((1 << 16) - 1)
#define NGHTTP2_STREAM_ID_MASK 0x7fffffff

View File

@ -142,7 +142,7 @@ int Spdylay::submit_request(const std::string& scheme,
const std::string& hostport,
const std::string& path,
const std::map<std::string,std::string> &headers,
uint8_t pri,
int32_t pri,
const nghttp2_data_provider *data_prd,
int64_t data_length,
void *stream_user_data)

View File

@ -58,7 +58,7 @@ public:
int submit_request(const std::string& scheme,
const std::string& hostport, const std::string& path,
const std::map<std::string,std::string>& headers,
uint8_t pri,
int32_t pri,
const nghttp2_data_provider *data_prd,
int64_t data_length,
void *stream_user_data);

View File

@ -373,7 +373,8 @@ void submit_request(Spdylay& sc, const std::string& hostport,
{
std::string path = req->make_reqpath();
int r = sc.submit_request(get_uri_field(req->uri.c_str(), req->u, UF_SCHEMA),
hostport, path, headers, 3, req->data_prd,
hostport, path, headers,
NGHTTP2_PRI_DEFAULT, req->data_prd,
req->data_length, req);
assert(r == 0);
}