diff --git a/client_stream.c b/client_stream.c index 6a6190a..efcec64 100644 --- a/client_stream.c +++ b/client_stream.c @@ -40,13 +40,12 @@ static void report_cb(EV_P_ ev_timer *w, int revents) } } -static int client_stream_send_stop(quicly_stream_t *stream, int err) +static void client_stream_send_stop(quicly_stream_t *stream, int err) { fprintf(stderr, "received STOP_SENDING: %i\n", err); - return 0; } -static int client_stream_receive(quicly_stream_t *stream, size_t off, const void *src, size_t len) +static void client_stream_receive(quicly_stream_t *stream, size_t off, const void *src, size_t len) { if(first_receive) { bytes_received = 0; @@ -57,19 +56,16 @@ static int client_stream_receive(quicly_stream_t *stream, size_t off, const void } if(len == 0) { - return 0; + return; } bytes_received += len; quicly_stream_sync_recvbuf(stream, len); - - return 0; } -static int client_stream_receive_reset(quicly_stream_t *stream, int err) +static void client_stream_receive_reset(quicly_stream_t *stream, int err) { fprintf(stderr, "received RESET_STREAM: %i\n", err); - return 0; } static const quicly_stream_callbacks_t client_stream_callbacks = { diff --git a/extern/quicly b/extern/quicly index 016c9d8..01869ac 160000 --- a/extern/quicly +++ b/extern/quicly @@ -1 +1 @@ -Subproject commit 016c9d8faa2ff4612ec3f487674916d8eddee8c1 +Subproject commit 01869ac2090edc73c8a6e028f535f4f1cb1f8ea8 diff --git a/server.c b/server.c index eb1e34b..9bd75af 100644 --- a/server.c +++ b/server.c @@ -110,12 +110,8 @@ static inline void server_handle_packet(quicly_decoded_packet_t *packet, struct // new conn int ret = quicly_accept(&conn, &server_ctx, 0, sa, packet, NULL, &next_cid, NULL); if(ret != 0) { - if(ret == QUICLY_TRANSPORT_ERROR_VERSION_NEGOTIATION) { - printf("quicly_accept failed with QUICLY_TRANSPORT_ERROR_VERSION_NEGOTIATION\n"); - } else { - printf("quicly_accept failed with code %i\n", ret); - } - return; // ignore errors, including QUICLY_TRANSPORT_ERROR_VERSION_NEGOTIATION + printf("quicly_accept failed with code %i\n", ret); + return; } ++next_cid.master_id; printf("got new connection\n"); diff --git a/server_stream.c b/server_stream.c index 893dd6a..aacf334 100644 --- a/server_stream.c +++ b/server_stream.c @@ -41,7 +41,7 @@ static void server_stream_send_shift(quicly_stream_t *stream, size_t delta) s->acked_offset += delta; } -static int server_stream_send_emit(quicly_stream_t *stream, size_t off, void *dst, size_t *len, int *wrote_all) +static void server_stream_send_emit(quicly_stream_t *stream, size_t off, void *dst, size_t *len, int *wrote_all) { server_stream *s = stream->data; uint64_t data_off = s->acked_offset + off; @@ -56,18 +56,15 @@ static int server_stream_send_emit(quicly_stream_t *stream, size_t off, void *ds } memset(dst, 0x58, *len); - - return 0; } -static int server_stream_send_stop(quicly_stream_t *stream, int err) +static void server_stream_send_stop(quicly_stream_t *stream, int err) { printf("server_stream_send_stop stream-id=%li\n", stream->stream_id); fprintf(stderr, "received STOP_SENDING: %i\n", err); - return 0; } -static int server_stream_receive(quicly_stream_t *stream, size_t off, const void *src, size_t len) +static void server_stream_receive(quicly_stream_t *stream, size_t off, const void *src, size_t len) { //print_escaped((const char*)src, len); quicly_stream_sync_recvbuf(stream, len); @@ -77,15 +74,12 @@ static int server_stream_receive(quicly_stream_t *stream, size_t off, const void quicly_stream_sync_sendbuf(stream, 1); ev_timer_start(EV_DEFAULT, &((server_stream*)stream->data)->report_timer); } - - return 0; } -static int server_stream_receive_reset(quicly_stream_t *stream, int err) +static void server_stream_receive_reset(quicly_stream_t *stream, int err) { printf("server_stream_receive_reset stream-id=%li\n", stream->stream_id); fprintf(stderr, "received RESET_STREAM: %i\n", err); - return 0; } static const quicly_stream_callbacks_t server_stream_callbacks = {