Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Mar 31, 2024
1 parent dd4b083 commit 83b69d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tunnels/client/protobuf/protobuf_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static inline void downStream(tunnel_t *self, context_t *c)
shiftr(buf, bytes_passed);
if (data_len > MAX_PACKET_SIZE)
{
LOGE("ProtoBufServer: rejected, size too large");
LOGE("ProtoBufServer: rejected, size too large %zu (%zu passed %d left)",data_len,bytes_passed,(int)(bufLen(buf)));
DISCARD_CONTEXT(c);
cleanup(cstate);
CSTATE_MUT(c) = NULL;
Expand Down
5 changes: 5 additions & 0 deletions tunnels/server/http2/http2_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ static int on_data_chunk_recv_callback(nghttp2_session *session,
context_t *stream_data = newContext(stream->line);
stream_data->payload = gdata_buf;
stream_data->src_io = con->io;
if (!stream->first_sent)
{
stream->first_sent = true;
stream_data->first = true;
}
stream->tunnel->upStream(stream->tunnel, stream_data);

if (nghttp2_session_get_stream_user_data(session, stream_id))
Expand Down
2 changes: 1 addition & 1 deletion tunnels/server/protobuf/protobuf_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static inline void upStream(tunnel_t *self, context_t *c)
shiftr(buf, bytes_passed);
if (data_len > MAX_PACKET_SIZE)
{
LOGE("ProtoBufServer: rejected, size too large");
LOGE("ProtoBufServer: rejected, size too large %zu (%zu passed %d left)",data_len,bytes_passed,(int)(bufLen(buf)));
DISCARD_CONTEXT(c);
cleanup(cstate);
CSTATE_MUT(c) = NULL;
Expand Down

0 comments on commit 83b69d0

Please sign in to comment.