else
{
/* RTS PDUs are not subject to flow control */
- rpc->VirtualConnection->DefaultOutChannel->RecipientBytesReceived += header.frag_length;
+ rpc->VirtualConnection->DefaultOutChannel->BytesReceived += header.frag_length;
rpc->VirtualConnection->DefaultOutChannel->ReceiverAvailableWindow -= header.frag_length;
}
{
if (rpc->read_buffer_len > length)
{
- /* TODO fix read_buffer is too long problem */
- printf("ERROR! RPC Stores data in read_buffer fits not in data on rpc_read.\n");
+ printf("rpc_read error: receiving buffer is not large enough\n");
return -1;
}
{
printf("Error! rpc_out_read() returned negative value. BytesSent: %d, BytesReceived: %d\n",
rpc->VirtualConnection->DefaultInChannel->BytesSent,
- rpc->VirtualConnection->DefaultOutChannel->RecipientBytesReceived);
+ rpc->VirtualConnection->DefaultOutChannel->BytesReceived);
xfree(rpc_data);
return status;
void rpc_client_virtual_connection_init(rdpRpc* rpc, RpcVirtualConnection* virtual_connection)
{
virtual_connection->DefaultInChannel->BytesSent = 0;
- virtual_connection->DefaultOutChannel->RecipientBytesReceived = 0;
+ virtual_connection->DefaultOutChannel->BytesReceived = 0;
virtual_connection->DefaultOutChannel->ReceiverAvailableWindow = rpc->ReceiveWindow;
virtual_connection->DefaultOutChannel->ReceiveWindow = rpc->ReceiveWindow;
virtual_connection->DefaultOutChannel->ReceiveWindowSize = rpc->ReceiveWindow;
return false;
}
- tsg->tunnelContext = xmalloc(16);
- memcpy(tsg->tunnelContext, data + 0x91c, 16);
+ tsg->TunnelContext = xmalloc(16);
+ memcpy(tsg->TunnelContext, data + 2300, 16);
#ifdef WITH_DEBUG_TSG
printf("TSG tunnelContext:\n");
- freerdp_hexdump(tsg->tunnelContext, 16);
+ freerdp_hexdump(tsg->TunnelContext, 16);
printf("\n");
#endif
- memcpy(tsg_packet2 + 4, tsg->tunnelContext, 16);
+ memcpy(tsg_packet2 + 4, tsg->TunnelContext, 16);
/**
* OpNum = 2
return false;
}
- memcpy(tsg_packet3 + 4, tsg->tunnelContext, 16);
+ memcpy(tsg_packet3 + 4, tsg->TunnelContext, 16);
/**
* OpNum = 3
uint8* dest_addr_unic = (uint8*) freerdp_uniconv_out(tsg_uniconv, hostname, (size_t*) &dest_addr_unic_len);
freerdp_uniconv_free(tsg_uniconv);
- memcpy(tsg_packet4 + 4, tsg->tunnelContext, 16);
+ memcpy(tsg_packet4 + 4, tsg->TunnelContext, 16);
memcpy(tsg_packet4 + 38, &port, 2);
STREAM* s_p4 = stream_new(60 + dest_addr_unic_len + 2);
stream_write_uint32(s_p4, 0x00000000); /* Offset */
stream_write_uint32(s_p4, (dest_addr_unic_len / 2) + 1);/* ActualCount */
stream_write(s_p4, dest_addr_unic, dest_addr_unic_len);
- stream_write_uint16(s_p4,0x0000); /* unicode zero to terminate hostname string */
+ stream_write_uint16(s_p4, 0x0000); /* unicode zero to terminate hostname string */
/**
* OpNum = 4
return false;
}
- tsg->channelContext = xmalloc(16);
- memcpy(tsg->channelContext, data + 4, 16);
+ tsg->ChannelContext = xmalloc(16);
+ memcpy(tsg->ChannelContext, data + 4, 16);
#ifdef WITH_DEBUG_TSG
- printf("TSG channelContext:\n");
- freerdp_hexdump(tsg->channelContext, 16);
+ printf("TSG ChannelContext:\n");
+ freerdp_hexdump(tsg->ChannelContext, 16);
printf("\n");
#endif
- memcpy(tsg_packet5 + 4, tsg->channelContext, 16);
+ memcpy(tsg_packet5 + 4, tsg->ChannelContext, 16);
/**
* OpNum = 8
tsg_pkg = xmalloc(tsg_length);
memset(tsg_pkg, 0, 4);
- memcpy(tsg_pkg + 4, tsg->channelContext, 16);
+ memcpy(tsg_pkg + 4, tsg->ChannelContext, 16);
memcpy(tsg_pkg + 20, s->data, 12);
memcpy(tsg_pkg + 32, data, length);