Skip to content

Commit

Permalink
Update to quicly master
Browse files Browse the repository at this point in the history
  • Loading branch information
AloysAugustin committed Apr 4, 2020
1 parent e9cd0b8 commit 944dea2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 25 deletions.
12 changes: 4 additions & 8 deletions client_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion extern/quicly
Submodule quicly updated 60 files
+5 −27 .travis.yml
+27 −8 CMakeLists.txt
+21 −2 README.md
+ corpus/0a399de681be01030f153b46392d38d64d82d78a
+ corpus/0dca570bf754fd714714c5138c4a11f107960c2d
+ corpus/2171d39aba22a970087967e87a046abac2dce468
+ corpus/2b886c7f8a0d0531160b63a3ebf576f6a8dacd85
+ corpus/40dee7955c00d21cb26da5eb406cc7ee41a6c362
+ corpus/62418d0e56a8dcea60f7891d9a33b659c7b3e7bd
+1 −0 corpus/64b68bf5b882b9bd0b37267287980ecfa0e44a85
+ corpus/76fd19f9ef948864613e2cbf5cfea2d95f7f28e6
+ corpus/80f90ef100ffec3ed550b90314ab33ecc0d8ce94
+ corpus/8e259d8a0b21698bf5731a964c38797b3e40e2e5
+ corpus/92361a23c86485ad68292506bc54ca077d111f87
+ corpus/94c57455b53b04173d9c2b0289a1d9cd0067d767
+ corpus/990336e07122731336a8fcb345b36f057e3016d4
+ corpus/9a52b25d098f6a4257ed48df74f60d59183d1f91
+ corpus/9d8401c2a100a7d416ff83f9751c25337e566233
+ corpus/a970114d1a081060268852221c1593608594f22d
+ corpus/b2639321ec13cc077e6a70d81ebd8813a84d30ec
+ corpus/ccb4d6c5b7f9eb65f6b2f051626e1e4eae2cc0ea
+ corpus/cd8b0f2a6fffa66c0e0dfe051c19643a609f55a5
+ corpus/db4b7b0acf91ef8ef42d9c11b524dcecb74bdf9d
+ corpus/e2d9da838028d2e97152858b474682420b59c10b
+1 −0 corpus/e328aa61973fa43cfb2aa0cbea594e16baddaa30
+ corpus/f6afe9dda9439811b81d6f4feaaf18d706182ab6
+ corpus/ff2d1eeea04672d78870670a0cd553b03be09512
+6 −0 cpanfile
+1 −1 deps/picotls
+6 −12 examples/echo.c
+97 −39 fuzz/packet.cc
+128 −25 include/quicly.h
+28 −5 include/quicly/constants.h
+4 −0 include/quicly/defaults.h
+35 −64 include/quicly/frame.h
+31 −22 include/quicly/loss.h
+19 −1 include/quicly/ranges.h
+6 −1 include/quicly/recvstate.h
+66 −92 include/quicly/sentmap.h
+7 −2 include/quicly/streambuf.h
+9 −2 lib/cc-reno.c
+123 −41 lib/defaults.c
+25 −14 lib/frame.c
+1,199 −667 lib/quicly.c
+25 −22 lib/ranges.c
+9 −6 lib/recvstate.c
+86 −100 lib/sentmap.c
+25 −9 lib/streambuf.c
+3 −5 misc/build_libFuzzer.sh
+4 −4 misc/probe2trace.pl
+14 −5 quicly-probes.d
+50 −2 quicly.xcodeproj/project.pbxproj
+507 −254 src/cli.c
+93 −2 t/e2e.t
+1 −1 t/frame.c
+24 −16 t/loss.c
+16 −17 t/sentmap.c
+19 −14 t/simple.c
+2 −1 t/stream-concurrency.c
+115 −76 t/test.c
8 changes: 2 additions & 6 deletions server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
14 changes: 4 additions & 10 deletions server_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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 = {
Expand Down

0 comments on commit 944dea2

Please sign in to comment.