Commit 5530a702 authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

pseudotcp: Tidy up buffer size handling in queue_connect_message()

This removes some hard-coded offsets. It does not introduce any
functional changes.
parent 733e079a
......@@ -779,14 +779,14 @@ queue_connect_message (PseudoTcpSocket *self)
{
PseudoTcpSocketPrivate *priv = self->priv;
guint8 buf[4];
gsize size = 1;
gsize size = 0;
buf[size++] = CTL_CONNECT;
buf[0] = CTL_CONNECT;
if (priv->support_wnd_scale) {
buf[1] = TCP_OPT_WND_SCALE;
buf[2] = 1;
buf[3] = priv->rwnd_scale;
size = 4;
buf[size++] = TCP_OPT_WND_SCALE;
buf[size++] = 1;
buf[size++] = priv->rwnd_scale;
}
priv->snd_wnd = size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment