src: Use nghttp2_error_callback2
This commit is contained in:
parent
43a2a70ae7
commit
194acb1f2c
|
@ -1749,7 +1749,7 @@ void fill_callback(nghttp2_session_callbacks *callbacks, const Config *config) {
|
||||||
nghttp2_session_callbacks_set_on_invalid_frame_recv_callback(
|
nghttp2_session_callbacks_set_on_invalid_frame_recv_callback(
|
||||||
callbacks, verbose_on_invalid_frame_recv_callback);
|
callbacks, verbose_on_invalid_frame_recv_callback);
|
||||||
|
|
||||||
nghttp2_session_callbacks_set_error_callback(callbacks,
|
nghttp2_session_callbacks_set_error_callback2(callbacks,
|
||||||
verbose_error_callback);
|
verbose_error_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -425,8 +425,8 @@ int verbose_on_data_chunk_recv_callback(nghttp2_session *session, uint8_t flags,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int verbose_error_callback(nghttp2_session *session, const char *msg,
|
int verbose_error_callback(nghttp2_session *session, int lib_error_code,
|
||||||
size_t len, void *user_data) {
|
const char *msg, size_t len, void *user_data) {
|
||||||
print_timer();
|
print_timer();
|
||||||
fprintf(outfile, " [ERROR] %.*s\n", (int)len, msg);
|
fprintf(outfile, " [ERROR] %.*s\n", (int)len, msg);
|
||||||
fflush(outfile);
|
fflush(outfile);
|
||||||
|
|
|
@ -60,8 +60,8 @@ int verbose_on_data_chunk_recv_callback(nghttp2_session *session, uint8_t flags,
|
||||||
int32_t stream_id, const uint8_t *data,
|
int32_t stream_id, const uint8_t *data,
|
||||||
size_t len, void *user_data);
|
size_t len, void *user_data);
|
||||||
|
|
||||||
int verbose_error_callback(nghttp2_session *session, const char *msg,
|
int verbose_error_callback(nghttp2_session *session, int lib_error_code,
|
||||||
size_t len, void *user_data);
|
const char *msg, size_t len, void *user_data);
|
||||||
|
|
||||||
// Returns difference between |a| and |b| in milliseconds, assuming
|
// Returns difference between |a| and |b| in milliseconds, assuming
|
||||||
// |a| is more recent than |b|.
|
// |a| is more recent than |b|.
|
||||||
|
|
|
@ -2458,7 +2458,7 @@ int run(char **uris, int n) {
|
||||||
nghttp2_session_callbacks_set_on_invalid_frame_recv_callback(
|
nghttp2_session_callbacks_set_on_invalid_frame_recv_callback(
|
||||||
callbacks, verbose_on_invalid_frame_recv_callback);
|
callbacks, verbose_on_invalid_frame_recv_callback);
|
||||||
|
|
||||||
nghttp2_session_callbacks_set_error_callback(callbacks,
|
nghttp2_session_callbacks_set_error_callback2(callbacks,
|
||||||
verbose_error_callback);
|
verbose_error_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -957,7 +957,7 @@ nghttp2_session_callbacks *create_http2_upstream_callbacks() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config->http2.upstream.debug.frame_debug) {
|
if (config->http2.upstream.debug.frame_debug) {
|
||||||
nghttp2_session_callbacks_set_error_callback(callbacks,
|
nghttp2_session_callbacks_set_error_callback2(callbacks,
|
||||||
verbose_error_callback);
|
verbose_error_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue