diff --git a/examples/libevent-client.c b/examples/libevent-client.c index fd4aad5b..251d7ecf 100644 --- a/examples/libevent-client.c +++ b/examples/libevent-client.c @@ -354,6 +354,8 @@ static void initialize_nghttp2_session(http2_session_data *session_data) { nghttp2_session_callbacks callbacks; + memset(&callbacks, 0, sizeof(callbacks)); + callbacks.send_callback = send_callback; callbacks.before_frame_send_callback = before_frame_send_callback; callbacks.on_frame_recv_callback = on_frame_recv_callback; diff --git a/examples/libevent-server.c b/examples/libevent-server.c index 1efa7e02..239292db 100644 --- a/examples/libevent-server.c +++ b/examples/libevent-server.c @@ -551,6 +551,8 @@ static void initialize_nghttp2_session(http2_session_data *session_data) { nghttp2_session_callbacks callbacks; + memset(&callbacks, 0, sizeof(callbacks)); + callbacks.send_callback = send_callback; callbacks.on_frame_recv_callback = on_frame_recv_callback; callbacks.on_stream_close_callback = on_stream_close_callback;