libfreerdp-utils: rename internal members of STREAM to match new wStream
This commit is contained in:
parent
882c914e6c
commit
62eec0c2b5
@ -139,13 +139,13 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, UINT3
|
|||||||
|
|
||||||
if (ascii)
|
if (ascii)
|
||||||
{
|
{
|
||||||
format_name->name = _strdup((char*) s->p);
|
format_name->name = _strdup((char*) s->pointer);
|
||||||
format_name->length = strlen(format_name->name);
|
format_name->length = strlen(format_name->name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
format_name->name = NULL;
|
format_name->name = NULL;
|
||||||
format_name->length = ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) s->p, 32 / 2, &format_name->name, 0, NULL, NULL);
|
format_name->length = ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) s->pointer, 32 / 2, &format_name->name, 0, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_seek(s, 32);
|
stream_seek(s, 32);
|
||||||
|
@ -137,7 +137,7 @@ static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
|
|||||||
|
|
||||||
buffer = (BYTE*) malloc(Length);
|
buffer = (BYTE*) malloc(Length);
|
||||||
|
|
||||||
status = read(parallel->file, irp->output->p, Length);
|
status = read(parallel->file, irp->output->pointer, Length);
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
{
|
{
|
||||||
|
@ -125,7 +125,7 @@ void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, UINT16 orderType)
|
|||||||
DEBUG_RAIL("Sending %s PDU, length:%d",
|
DEBUG_RAIL("Sending %s PDU, length:%d",
|
||||||
RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
|
RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
|
||||||
|
|
||||||
rail_send_channel_data(rail_order->plugin, s->data, orderLength);
|
rail_send_channel_data(rail_order->plugin, s->buffer, orderLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rail_write_high_contrast(STREAM* s, HIGH_CONTRAST* high_contrast)
|
void rail_write_high_contrast(STREAM* s, HIGH_CONTRAST* high_contrast)
|
||||||
|
@ -563,7 +563,7 @@ static BYTE* xf_cliprdr_process_requested_dib(BYTE* data, int* size)
|
|||||||
/* length should be at least BMP header (14) + sizeof(BITMAPINFOHEADER) */
|
/* length should be at least BMP header (14) + sizeof(BITMAPINFOHEADER) */
|
||||||
if (*size < 54)
|
if (*size < 54)
|
||||||
{
|
{
|
||||||
DEBUG_X11_CLIPRDR("bmp length %d too short", *size);
|
DEBUG_X11_CLIPRDR("bmp length %d too short", *capacity);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -906,7 +906,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size)
|
|||||||
/* size should be at least sizeof(BITMAPINFOHEADER) */
|
/* size should be at least sizeof(BITMAPINFOHEADER) */
|
||||||
if (size < 40)
|
if (size < 40)
|
||||||
{
|
{
|
||||||
DEBUG_X11_CLIPRDR("dib size %d too short", size);
|
DEBUG_X11_CLIPRDR("dib size %d too short", capacity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -967,7 +967,7 @@ static void xf_cliprdr_process_cb_data_response_event(xfInfo* xfi, RDP_CB_DATA_R
|
|||||||
{
|
{
|
||||||
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
|
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
|
||||||
|
|
||||||
DEBUG_X11_CLIPRDR("size=%d", event->size);
|
DEBUG_X11_CLIPRDR("size=%d", event->capacity);
|
||||||
|
|
||||||
if (cb->respond == NULL)
|
if (cb->respond == NULL)
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line
|
|||||||
int actual_length;
|
int actual_length;
|
||||||
BYTE* actual_data;
|
BYTE* actual_data;
|
||||||
|
|
||||||
actual_data = s->data;
|
actual_data = s->buffer;
|
||||||
actual_length = stream_get_length(s);
|
actual_length = stream_get_length(s);
|
||||||
|
|
||||||
if (actual_length != length)
|
if (actual_length != length)
|
||||||
|
@ -95,9 +95,9 @@ void test_gcc_write_conference_create_request(void)
|
|||||||
STREAM* s;
|
STREAM* s;
|
||||||
STREAM user_data;
|
STREAM user_data;
|
||||||
|
|
||||||
user_data.data = gcc_user_data;
|
user_data.buffer = gcc_user_data;
|
||||||
user_data.size = sizeof(gcc_user_data);
|
user_data.capacity = sizeof(gcc_user_data);
|
||||||
user_data.p = user_data.data + user_data.size;
|
user_data.pointer = user_data.buffer + user_data.capacity;
|
||||||
|
|
||||||
s = stream_new(sizeof(gcc_conference_create_request_expected));
|
s = stream_new(sizeof(gcc_conference_create_request_expected));
|
||||||
|
|
||||||
|
@ -319,8 +319,8 @@ void test_license(void)
|
|||||||
memcpy(license->ClientRandom, client_random, sizeof(client_random));
|
memcpy(license->ClientRandom, client_random, sizeof(client_random));
|
||||||
memcpy(license->PremasterSecret, premaster_secret, sizeof(premaster_secret));
|
memcpy(license->PremasterSecret, premaster_secret, sizeof(premaster_secret));
|
||||||
|
|
||||||
s->data = server_license_request;
|
s->buffer = server_license_request;
|
||||||
s->p = s->data + LICENSE_PREAMBLE_LENGTH;
|
s->pointer = s->buffer + LICENSE_PREAMBLE_LENGTH;
|
||||||
license_read_license_request_packet(license, s);
|
license_read_license_request_packet(license, s);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -355,7 +355,7 @@ void test_license(void)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("modulus:\n");
|
printf("modulus:\n");
|
||||||
winpr_HexDump(license->certificate->cert_info.modulus.data,
|
winpr_HexDump(license->certificate->cert_info.modulus.buffer,
|
||||||
license->certificate->cert_info.modulus.length);
|
license->certificate->cert_info.modulus.length);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
@ -364,13 +364,13 @@ void test_license(void)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("encrypted premaster secret:\n");
|
printf("encrypted premaster secret:\n");
|
||||||
winpr_HexDump(license->EncryptedPremasterSecret->data,
|
winpr_HexDump(license->EncryptedPremasterSecret->buffer,
|
||||||
license->EncryptedPremasterSecret->length);
|
license->EncryptedPremasterSecret->length);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
s->data = server_platform_challenge;
|
s->buffer = server_platform_challenge;
|
||||||
s->p = s->data + LICENSE_PREAMBLE_LENGTH;
|
s->pointer = s->buffer + LICENSE_PREAMBLE_LENGTH;
|
||||||
license_read_platform_challenge_packet(license, s);
|
license_read_platform_challenge_packet(license, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,24 +432,24 @@ void test_license_generate_keys(void)
|
|||||||
license_generate_keys(license);
|
license_generate_keys(license);
|
||||||
license_encrypt_premaster_secret(license);
|
license_encrypt_premaster_secret(license);
|
||||||
|
|
||||||
s->data = license->MasterSecret;
|
s->buffer = license->MasterSecret;
|
||||||
s->p = s->data + sizeof(test_master_secret);
|
s->pointer = s->buffer + sizeof(test_master_secret);
|
||||||
ASSERT_STREAM(s, test_master_secret, sizeof(test_master_secret));
|
ASSERT_STREAM(s, test_master_secret, sizeof(test_master_secret));
|
||||||
|
|
||||||
s->data = license->SessionKeyBlob;
|
s->buffer = license->SessionKeyBlob;
|
||||||
s->p = s->data + sizeof(test_session_key_blob);
|
s->pointer = s->buffer + sizeof(test_session_key_blob);
|
||||||
ASSERT_STREAM(s, test_session_key_blob, sizeof(test_session_key_blob));
|
ASSERT_STREAM(s, test_session_key_blob, sizeof(test_session_key_blob));
|
||||||
|
|
||||||
s->data = license->MacSaltKey;
|
s->buffer = license->MacSaltKey;
|
||||||
s->p = s->data + sizeof(test_mac_salt_key);
|
s->pointer = s->buffer + sizeof(test_mac_salt_key);
|
||||||
ASSERT_STREAM(s, test_mac_salt_key, sizeof(test_mac_salt_key));
|
ASSERT_STREAM(s, test_mac_salt_key, sizeof(test_mac_salt_key));
|
||||||
|
|
||||||
s->data = license->LicensingEncryptionKey;
|
s->buffer = license->LicensingEncryptionKey;
|
||||||
s->p = s->data + sizeof(test_licensing_encryption_key);
|
s->pointer = s->buffer + sizeof(test_licensing_encryption_key);
|
||||||
ASSERT_STREAM(s, test_licensing_encryption_key, sizeof(test_licensing_encryption_key));
|
ASSERT_STREAM(s, test_licensing_encryption_key, sizeof(test_licensing_encryption_key));
|
||||||
|
|
||||||
s->data = license->EncryptedPremasterSecret->data;
|
s->buffer = license->EncryptedPremasterSecret->data;
|
||||||
s->p = s->data + sizeof(test_encrypted_premaster_secret);
|
s->pointer = s->buffer + sizeof(test_encrypted_premaster_secret);
|
||||||
ASSERT_STREAM(s, test_encrypted_premaster_secret, sizeof(test_encrypted_premaster_secret));
|
ASSERT_STREAM(s, test_encrypted_premaster_secret, sizeof(test_encrypted_premaster_secret));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,8 +463,8 @@ void test_license_encrypt_premaster_secret(void)
|
|||||||
memcpy(license->certificate->cert_info.Modulus, test_modulus, sizeof(test_modulus));
|
memcpy(license->certificate->cert_info.Modulus, test_modulus, sizeof(test_modulus));
|
||||||
license->certificate->cert_info.ModulusLength = sizeof(test_modulus);
|
license->certificate->cert_info.ModulusLength = sizeof(test_modulus);
|
||||||
|
|
||||||
s->data = license->EncryptedPremasterSecret->data;
|
s->buffer = license->EncryptedPremasterSecret->data;
|
||||||
s->p = s->data + sizeof(test_encrypted_premaster_secret);
|
s->pointer = s->buffer + sizeof(test_encrypted_premaster_secret);
|
||||||
ASSERT_STREAM(s, test_encrypted_premaster_secret, sizeof(test_encrypted_premaster_secret));
|
ASSERT_STREAM(s, test_encrypted_premaster_secret, sizeof(test_encrypted_premaster_secret));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,8 +492,8 @@ void test_license_decrypt_platform_challenge(void)
|
|||||||
|
|
||||||
license_decrypt_platform_challenge(license);
|
license_decrypt_platform_challenge(license);
|
||||||
|
|
||||||
s->data = license->PlatformChallenge->data;
|
s->buffer = license->PlatformChallenge->data;
|
||||||
s->p = s->data + sizeof(test_platform_challenge);
|
s->pointer = s->buffer + sizeof(test_platform_challenge);
|
||||||
|
|
||||||
ASSERT_STREAM(s, test_platform_challenge, sizeof(test_platform_challenge));
|
ASSERT_STREAM(s, test_platform_challenge, sizeof(test_platform_challenge));
|
||||||
}
|
}
|
||||||
|
@ -103,8 +103,8 @@ void test_mcs_write_connect_initial(void)
|
|||||||
mcs = mcs_new((rdpTransport*) NULL);
|
mcs = mcs_new((rdpTransport*) NULL);
|
||||||
|
|
||||||
user_data = &_user_data;
|
user_data = &_user_data;
|
||||||
user_data->data = gcc_CCrq;
|
user_data->buffer = gcc_CCrq;
|
||||||
user_data->p = user_data->data + sizeof(gcc_CCrq);
|
user_data->pointer = user_data->buffer + sizeof(gcc_CCrq);
|
||||||
|
|
||||||
s = stream_new(512);
|
s = stream_new(512);
|
||||||
mcs_write_connect_initial(s, mcs, user_data);
|
mcs_write_connect_initial(s, mcs, user_data);
|
||||||
|
@ -77,7 +77,7 @@ void test_read_dstblt_order(void)
|
|||||||
DSTBLT_ORDER dstblt;
|
DSTBLT_ORDER dstblt;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = dstblt_order;
|
s->pointer = s->buffer = dstblt_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x0C;
|
orderInfo->fieldFlags = 0x0C;
|
||||||
@ -102,7 +102,7 @@ void test_read_patblt_order(void)
|
|||||||
PATBLT_ORDER patblt;
|
PATBLT_ORDER patblt;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = patblt_order;
|
s->pointer = s->buffer = patblt_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x027F;
|
orderInfo->fieldFlags = 0x027F;
|
||||||
@ -132,7 +132,7 @@ void test_read_scrblt_order(void)
|
|||||||
SCRBLT_ORDER scrblt;
|
SCRBLT_ORDER scrblt;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = scrblt_order;
|
s->pointer = s->buffer = scrblt_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x7D;
|
orderInfo->fieldFlags = 0x7D;
|
||||||
@ -159,7 +159,7 @@ void test_read_opaque_rect_order(void)
|
|||||||
OPAQUE_RECT_ORDER opaque_rect;
|
OPAQUE_RECT_ORDER opaque_rect;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = opaque_rect_order;
|
s->pointer = s->buffer = opaque_rect_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x7C;
|
orderInfo->fieldFlags = 0x7C;
|
||||||
@ -184,7 +184,7 @@ void test_read_draw_nine_grid_order(void)
|
|||||||
DRAW_NINE_GRID_ORDER draw_nine_grid;
|
DRAW_NINE_GRID_ORDER draw_nine_grid;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = draw_nine_grid_order;
|
s->pointer = s->buffer = draw_nine_grid_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x1C;
|
orderInfo->fieldFlags = 0x1C;
|
||||||
@ -217,7 +217,7 @@ void test_read_multi_opaque_rect_order(void)
|
|||||||
MULTI_OPAQUE_RECT_ORDER multi_opaque_rect;
|
MULTI_OPAQUE_RECT_ORDER multi_opaque_rect;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = multi_opaque_rect_order;
|
s->pointer = s->buffer = multi_opaque_rect_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x01BF;
|
orderInfo->fieldFlags = 0x01BF;
|
||||||
@ -264,7 +264,7 @@ void test_read_line_to_order(void)
|
|||||||
LINE_TO_ORDER line_to;
|
LINE_TO_ORDER line_to;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = line_to_order;
|
s->pointer = s->buffer = line_to_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x021E;
|
orderInfo->fieldFlags = 0x021E;
|
||||||
@ -307,7 +307,7 @@ void test_read_polyline_order(void)
|
|||||||
POLYLINE_ORDER polyline;
|
POLYLINE_ORDER polyline;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = polyline_order;
|
s->pointer = s->buffer = polyline_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x73;
|
orderInfo->fieldFlags = 0x73;
|
||||||
@ -375,7 +375,7 @@ void test_read_glyph_index_order(void)
|
|||||||
GLYPH_INDEX_ORDER glyph_index;
|
GLYPH_INDEX_ORDER glyph_index;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = glyph_index_order_1;
|
s->pointer = s->buffer = glyph_index_order_1;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x200100;
|
orderInfo->fieldFlags = 0x200100;
|
||||||
@ -389,7 +389,7 @@ void test_read_glyph_index_order(void)
|
|||||||
|
|
||||||
CU_ASSERT(stream_get_length(s) == (sizeof(glyph_index_order_1) - 1));
|
CU_ASSERT(stream_get_length(s) == (sizeof(glyph_index_order_1) - 1));
|
||||||
|
|
||||||
s->p = s->data = glyph_index_order_2;
|
s->pointer = s->buffer = glyph_index_order_2;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x383FE8;
|
orderInfo->fieldFlags = 0x383FE8;
|
||||||
@ -426,7 +426,7 @@ void test_read_fast_index_order(void)
|
|||||||
FAST_INDEX_ORDER fast_index;
|
FAST_INDEX_ORDER fast_index;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = fast_index_order;
|
s->pointer = s->buffer = fast_index_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x70FF;
|
orderInfo->fieldFlags = 0x70FF;
|
||||||
@ -464,7 +464,7 @@ void test_read_fast_glyph_order(void)
|
|||||||
FAST_GLYPH_ORDER fast_glyph;
|
FAST_GLYPH_ORDER fast_glyph;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = fast_glyph_order;
|
s->pointer = s->buffer = fast_glyph_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x7EFB;
|
orderInfo->fieldFlags = 0x7EFB;
|
||||||
@ -499,7 +499,7 @@ void test_read_polygon_cb_order(void)
|
|||||||
POLYGON_CB_ORDER polygon_cb;
|
POLYGON_CB_ORDER polygon_cb;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = polygon_cb_order;
|
s->pointer = s->buffer = polygon_cb_order;
|
||||||
|
|
||||||
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
memset(orderInfo, 0, sizeof(ORDER_INFO));
|
||||||
orderInfo->fieldFlags = 0x1BEF;
|
orderInfo->fieldFlags = 0x1BEF;
|
||||||
@ -533,7 +533,7 @@ void test_read_cache_bitmap_order(void)
|
|||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
extraFlags = 0x0400;
|
extraFlags = 0x0400;
|
||||||
s->p = s->data = cache_bitmap_order;
|
s->pointer = s->buffer = cache_bitmap_order;
|
||||||
|
|
||||||
memset(&cache_bitmap, 0, sizeof(CACHE_BITMAP_ORDER));
|
memset(&cache_bitmap, 0, sizeof(CACHE_BITMAP_ORDER));
|
||||||
|
|
||||||
@ -574,7 +574,7 @@ void test_read_cache_bitmap_v2_order(void)
|
|||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
extraFlags = 0x0CA1;
|
extraFlags = 0x0CA1;
|
||||||
s->p = s->data = cache_bitmap_v2_order;
|
s->pointer = s->buffer = cache_bitmap_v2_order;
|
||||||
|
|
||||||
memset(&cache_bitmap_v2, 0, sizeof(CACHE_BITMAP_V2_ORDER));
|
memset(&cache_bitmap_v2, 0, sizeof(CACHE_BITMAP_V2_ORDER));
|
||||||
|
|
||||||
@ -605,7 +605,7 @@ void test_read_cache_bitmap_v3_order(void)
|
|||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
extraFlags = 0x0C30;
|
extraFlags = 0x0C30;
|
||||||
s->p = s->data = cache_bitmap_v3_order;
|
s->pointer = s->buffer = cache_bitmap_v3_order;
|
||||||
|
|
||||||
memset(&cache_bitmap_v3, 0, sizeof(CACHE_BITMAP_V3_ORDER));
|
memset(&cache_bitmap_v3, 0, sizeof(CACHE_BITMAP_V3_ORDER));
|
||||||
|
|
||||||
@ -633,7 +633,7 @@ void test_read_cache_brush_order(void)
|
|||||||
CACHE_BRUSH_ORDER cache_brush;
|
CACHE_BRUSH_ORDER cache_brush;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = cache_brush_order;
|
s->pointer = s->buffer = cache_brush_order;
|
||||||
|
|
||||||
memset(&cache_brush, 0, sizeof(CACHE_BRUSH_ORDER));
|
memset(&cache_brush, 0, sizeof(CACHE_BRUSH_ORDER));
|
||||||
|
|
||||||
@ -658,7 +658,7 @@ void test_read_create_offscreen_bitmap_order(void)
|
|||||||
CREATE_OFFSCREEN_BITMAP_ORDER create_offscreen_bitmap;
|
CREATE_OFFSCREEN_BITMAP_ORDER create_offscreen_bitmap;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = create_offscreen_bitmap_order;
|
s->pointer = s->buffer = create_offscreen_bitmap_order;
|
||||||
|
|
||||||
memset(&create_offscreen_bitmap, 0, sizeof(CREATE_OFFSCREEN_BITMAP_ORDER));
|
memset(&create_offscreen_bitmap, 0, sizeof(CREATE_OFFSCREEN_BITMAP_ORDER));
|
||||||
|
|
||||||
@ -685,7 +685,7 @@ void test_read_switch_surface_order(void)
|
|||||||
SWITCH_SURFACE_ORDER switch_surface;
|
SWITCH_SURFACE_ORDER switch_surface;
|
||||||
|
|
||||||
s = &_s;
|
s = &_s;
|
||||||
s->p = s->data = switch_surface_order;
|
s->pointer = s->buffer = switch_surface_order;
|
||||||
|
|
||||||
memset(&switch_surface, 0, sizeof(SWITCH_SURFACE_ORDER));
|
memset(&switch_surface, 0, sizeof(SWITCH_SURFACE_ORDER));
|
||||||
|
|
||||||
@ -751,8 +751,8 @@ void test_update_recv_orders(void)
|
|||||||
update->primary->Polyline = test_polyline;
|
update->primary->Polyline = test_polyline;
|
||||||
update->primary->PatBlt = test_patblt;
|
update->primary->PatBlt = test_patblt;
|
||||||
|
|
||||||
s->p = s->data = orders_update_1;
|
s->pointer = s->buffer = orders_update_1;
|
||||||
s->size = sizeof(orders_update_1);
|
s->capacity = sizeof(orders_update_1);
|
||||||
|
|
||||||
CU_ASSERT(update_recv(update, s));
|
CU_ASSERT(update_recv(update, s));
|
||||||
|
|
||||||
@ -760,8 +760,8 @@ void test_update_recv_orders(void)
|
|||||||
CU_ASSERT(polyline_count == 2);
|
CU_ASSERT(polyline_count == 2);
|
||||||
|
|
||||||
update->primary->order_info.orderType = ORDER_TYPE_PATBLT;
|
update->primary->order_info.orderType = ORDER_TYPE_PATBLT;
|
||||||
s->p = s->data = orders_update_2;
|
s->pointer = s->buffer = orders_update_2;
|
||||||
s->size = sizeof(orders_update_2);
|
s->capacity = sizeof(orders_update_2);
|
||||||
|
|
||||||
CU_ASSERT(update_recv(update, s));
|
CU_ASSERT(update_recv(update, s));
|
||||||
|
|
||||||
|
@ -523,10 +523,10 @@ static void save_dump(void* data, size_t size)
|
|||||||
if (p->in_streams_number < ARRAYSIZE(p->in_streams))
|
if (p->in_streams_number < ARRAYSIZE(p->in_streams))
|
||||||
{
|
{
|
||||||
STREAM* s = &p->in_streams[p->in_streams_number];
|
STREAM* s = &p->in_streams[p->in_streams_number];
|
||||||
s->data = malloc(size);
|
s->buffer = malloc(size);
|
||||||
s->size = size;
|
s->capacity = size;
|
||||||
|
|
||||||
memcpy(s->data, data, size);
|
memcpy(s->buffer, data, size);
|
||||||
p->in_streams_number++;
|
p->in_streams_number++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,7 @@ void test_message(void)
|
|||||||
stream_seal(s);
|
stream_seal(s);
|
||||||
/*hexdump(buffer, size);*/
|
/*hexdump(buffer, size);*/
|
||||||
stream_set_pos(s, 0);
|
stream_set_pos(s, 0);
|
||||||
message = rfx_process_message(context, s->p, s->size);
|
message = rfx_process_message(context, s->pointer, s->capacity);
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
for (j = 0; j < message->num_tiles; j++)
|
for (j = 0; j < message->num_tiles; j++)
|
||||||
|
@ -22,14 +22,18 @@
|
|||||||
#define FREERDP_UTILS_STREAM_H
|
#define FREERDP_UTILS_STREAM_H
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <freerdp/api.h>
|
#include <freerdp/api.h>
|
||||||
#include <freerdp/types.h>
|
#include <freerdp/types.h>
|
||||||
|
|
||||||
|
#include <winpr/stream.h>
|
||||||
|
|
||||||
struct _STREAM
|
struct _STREAM
|
||||||
{
|
{
|
||||||
int size;
|
BYTE* buffer;
|
||||||
BYTE* p;
|
BYTE* pointer;
|
||||||
BYTE* data;
|
size_t length;
|
||||||
|
size_t capacity;
|
||||||
};
|
};
|
||||||
typedef struct _STREAM STREAM;
|
typedef struct _STREAM STREAM;
|
||||||
|
|
||||||
@ -41,109 +45,109 @@ FREERDP_API STREAM* stream_new(int size);
|
|||||||
FREERDP_API void stream_free(STREAM* stream);
|
FREERDP_API void stream_free(STREAM* stream);
|
||||||
|
|
||||||
#define stream_attach(_s, _buf, _size) do { \
|
#define stream_attach(_s, _buf, _size) do { \
|
||||||
_s->size = _size; \
|
_s->capacity = _size; \
|
||||||
_s->data = _buf; \
|
_s->buffer = _buf; \
|
||||||
_s->p = _buf; } while (0)
|
_s->pointer = _buf; } while (0)
|
||||||
#define stream_detach(_s) memset(_s, 0, sizeof(STREAM))
|
#define stream_detach(_s) memset(_s, 0, sizeof(STREAM))
|
||||||
#define stream_clear(_s) memset(_s->data, 0, _s->size)
|
#define stream_clear(_s) memset(_s->buffer, 0, _s->capacity)
|
||||||
|
|
||||||
FREERDP_API void stream_extend(STREAM* stream, int request_size);
|
FREERDP_API void stream_extend(STREAM* stream, int request_size);
|
||||||
#define stream_check_size(_s, _n) \
|
#define stream_check_size(_s, _n) \
|
||||||
while (_s->p - _s->data + (_n) > _s->size) \
|
while (_s->pointer - _s->buffer + (_n) > _s->capacity) \
|
||||||
stream_extend(_s, _n)
|
stream_extend(_s, _n)
|
||||||
|
|
||||||
#define stream_get_pos(_s) (_s->p - _s->data)
|
#define stream_get_pos(_s) (_s->pointer - _s->buffer)
|
||||||
#define stream_set_pos(_s,_m) _s->p = _s->data + (_m)
|
#define stream_set_pos(_s,_m) _s->pointer = _s->buffer + (_m)
|
||||||
#define stream_seek(_s,_offset) _s->p += (_offset)
|
#define stream_seek(_s,_offset) _s->pointer += (_offset)
|
||||||
#define stream_rewind(_s,_offset) _s->p -= (_offset)
|
#define stream_rewind(_s,_offset) _s->pointer -= (_offset)
|
||||||
#define stream_seal(_s) _s->size = (_s->p - _s->data)
|
#define stream_seal(_s) _s->capacity = (_s->pointer - _s->buffer)
|
||||||
#define stream_get_mark(_s,_mark) _mark = _s->p
|
#define stream_get_mark(_s,_mark) _mark = _s->pointer
|
||||||
#define stream_set_mark(_s,_mark) _s->p = _mark
|
#define stream_set_mark(_s,_mark) _s->pointer = _mark
|
||||||
#define stream_get_head(_s) _s->data
|
#define stream_get_head(_s) _s->buffer
|
||||||
#define stream_get_tail(_s) _s->p
|
#define stream_get_tail(_s) _s->pointer
|
||||||
#define stream_get_length(_s) (_s->p - _s->data)
|
#define stream_get_length(_s) (_s->pointer - _s->buffer)
|
||||||
#define stream_get_data(_s) (_s->data)
|
#define stream_get_data(_s) (_s->buffer)
|
||||||
#define stream_get_size(_s) (_s->size)
|
#define stream_get_size(_s) (_s->capacity)
|
||||||
#define stream_get_left(_s) (_s->size - (_s->p - _s->data))
|
#define stream_get_left(_s) (_s->capacity - (_s->pointer - _s->buffer))
|
||||||
|
|
||||||
#define stream_read_BYTE(_s, _v) do { _v = *_s->p++; } while (0)
|
#define stream_read_BYTE(_s, _v) do { _v = *_s->pointer++; } while (0)
|
||||||
#define stream_read_UINT16(_s, _v) do { _v = \
|
#define stream_read_UINT16(_s, _v) do { _v = \
|
||||||
(UINT16)(*_s->p) + \
|
(UINT16)(*_s->pointer) + \
|
||||||
(UINT16)(((UINT16)(*(_s->p + 1))) << 8); \
|
(UINT16)(((UINT16)(*(_s->pointer + 1))) << 8); \
|
||||||
_s->p += 2; } while (0)
|
_s->pointer += 2; } while (0)
|
||||||
#define stream_read_UINT32(_s, _v) do { _v = \
|
#define stream_read_UINT32(_s, _v) do { _v = \
|
||||||
(UINT32)(*_s->p) + \
|
(UINT32)(*_s->pointer) + \
|
||||||
(((UINT32)(*(_s->p + 1))) << 8) + \
|
(((UINT32)(*(_s->pointer + 1))) << 8) + \
|
||||||
(((UINT32)(*(_s->p + 2))) << 16) + \
|
(((UINT32)(*(_s->pointer + 2))) << 16) + \
|
||||||
(((UINT32)(*(_s->p + 3))) << 24); \
|
(((UINT32)(*(_s->pointer + 3))) << 24); \
|
||||||
_s->p += 4; } while (0)
|
_s->pointer += 4; } while (0)
|
||||||
#define stream_read_UINT64(_s, _v) do { _v = \
|
#define stream_read_UINT64(_s, _v) do { _v = \
|
||||||
(UINT64)(*_s->p) + \
|
(UINT64)(*_s->pointer) + \
|
||||||
(((UINT64)(*(_s->p + 1))) << 8) + \
|
(((UINT64)(*(_s->pointer + 1))) << 8) + \
|
||||||
(((UINT64)(*(_s->p + 2))) << 16) + \
|
(((UINT64)(*(_s->pointer + 2))) << 16) + \
|
||||||
(((UINT64)(*(_s->p + 3))) << 24) + \
|
(((UINT64)(*(_s->pointer + 3))) << 24) + \
|
||||||
(((UINT64)(*(_s->p + 4))) << 32) + \
|
(((UINT64)(*(_s->pointer + 4))) << 32) + \
|
||||||
(((UINT64)(*(_s->p + 5))) << 40) + \
|
(((UINT64)(*(_s->pointer + 5))) << 40) + \
|
||||||
(((UINT64)(*(_s->p + 6))) << 48) + \
|
(((UINT64)(*(_s->pointer + 6))) << 48) + \
|
||||||
(((UINT64)(*(_s->p + 7))) << 56); \
|
(((UINT64)(*(_s->pointer + 7))) << 56); \
|
||||||
_s->p += 8; } while (0)
|
_s->pointer += 8; } while (0)
|
||||||
#define stream_read(_s, _b, _n) do { \
|
#define stream_read(_s, _b, _n) do { \
|
||||||
memcpy(_b, (_s->p), (_n)); \
|
memcpy(_b, (_s->pointer), (_n)); \
|
||||||
_s->p += (_n); \
|
_s->pointer += (_n); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define stream_write_BYTE(_s, _v) do { \
|
#define stream_write_BYTE(_s, _v) do { \
|
||||||
*_s->p++ = (BYTE)(_v); } while (0)
|
*_s->pointer++ = (BYTE)(_v); } while (0)
|
||||||
#define stream_write_UINT16(_s, _v) do { \
|
#define stream_write_UINT16(_s, _v) do { \
|
||||||
*_s->p++ = (_v) & 0xFF; \
|
*_s->pointer++ = (_v) & 0xFF; \
|
||||||
*_s->p++ = ((_v) >> 8) & 0xFF; } while (0)
|
*_s->pointer++ = ((_v) >> 8) & 0xFF; } while (0)
|
||||||
#define stream_write_UINT32(_s, _v) do { \
|
#define stream_write_UINT32(_s, _v) do { \
|
||||||
*_s->p++ = (_v) & 0xFF; \
|
*_s->pointer++ = (_v) & 0xFF; \
|
||||||
*_s->p++ = ((_v) >> 8) & 0xFF; \
|
*_s->pointer++ = ((_v) >> 8) & 0xFF; \
|
||||||
*_s->p++ = ((_v) >> 16) & 0xFF; \
|
*_s->pointer++ = ((_v) >> 16) & 0xFF; \
|
||||||
*_s->p++ = ((_v) >> 24) & 0xFF; } while (0)
|
*_s->pointer++ = ((_v) >> 24) & 0xFF; } while (0)
|
||||||
#define stream_write_UINT64(_s, _v) do { \
|
#define stream_write_UINT64(_s, _v) do { \
|
||||||
*_s->p++ = (UINT64)(_v) & 0xFF; \
|
*_s->pointer++ = (UINT64)(_v) & 0xFF; \
|
||||||
*_s->p++ = ((UINT64)(_v) >> 8) & 0xFF; \
|
*_s->pointer++ = ((UINT64)(_v) >> 8) & 0xFF; \
|
||||||
*_s->p++ = ((UINT64)(_v) >> 16) & 0xFF; \
|
*_s->pointer++ = ((UINT64)(_v) >> 16) & 0xFF; \
|
||||||
*_s->p++ = ((UINT64)(_v) >> 24) & 0xFF; \
|
*_s->pointer++ = ((UINT64)(_v) >> 24) & 0xFF; \
|
||||||
*_s->p++ = ((UINT64)(_v) >> 32) & 0xFF; \
|
*_s->pointer++ = ((UINT64)(_v) >> 32) & 0xFF; \
|
||||||
*_s->p++ = ((UINT64)(_v) >> 40) & 0xFF; \
|
*_s->pointer++ = ((UINT64)(_v) >> 40) & 0xFF; \
|
||||||
*_s->p++ = ((UINT64)(_v) >> 48) & 0xFF; \
|
*_s->pointer++ = ((UINT64)(_v) >> 48) & 0xFF; \
|
||||||
*_s->p++ = ((UINT64)(_v) >> 56) & 0xFF; } while (0)
|
*_s->pointer++ = ((UINT64)(_v) >> 56) & 0xFF; } while (0)
|
||||||
#define stream_write(_s, _b, _n) do { \
|
#define stream_write(_s, _b, _n) do { \
|
||||||
memcpy(_s->p, (_b), (_n)); \
|
memcpy(_s->pointer, (_b), (_n)); \
|
||||||
_s->p += (_n); \
|
_s->pointer += (_n); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define stream_write_zero(_s, _n) do { \
|
#define stream_write_zero(_s, _n) do { \
|
||||||
memset(_s->p, '\0', (_n)); \
|
memset(_s->pointer, '\0', (_n)); \
|
||||||
_s->p += (_n); \
|
_s->pointer += (_n); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define stream_set_byte(_s, _v, _n) do { \
|
#define stream_set_byte(_s, _v, _n) do { \
|
||||||
memset(_s->p, _v, (_n)); \
|
memset(_s->pointer, _v, (_n)); \
|
||||||
_s->p += (_n); \
|
_s->pointer += (_n); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define stream_peek_BYTE(_s, _v) do { _v = *_s->p; } while (0)
|
#define stream_peek_BYTE(_s, _v) do { _v = *_s->pointer; } while (0)
|
||||||
#define stream_peek_UINT16(_s, _v) do { _v = \
|
#define stream_peek_UINT16(_s, _v) do { _v = \
|
||||||
(UINT16)(*_s->p) + \
|
(UINT16)(*_s->pointer) + \
|
||||||
(((UINT16)(*(_s->p + 1))) << 8); \
|
(((UINT16)(*(_s->pointer + 1))) << 8); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define stream_peek_UINT32(_s, _v) do { _v = \
|
#define stream_peek_UINT32(_s, _v) do { _v = \
|
||||||
(UINT32)(*_s->p) + \
|
(UINT32)(*_s->pointer) + \
|
||||||
(((UINT32)(*(_s->p + 1))) << 8) + \
|
(((UINT32)(*(_s->pointer + 1))) << 8) + \
|
||||||
(((UINT32)(*(_s->p + 2))) << 16) + \
|
(((UINT32)(*(_s->pointer + 2))) << 16) + \
|
||||||
(((UINT32)(*(_s->p + 3))) << 24); \
|
(((UINT32)(*(_s->pointer + 3))) << 24); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define stream_peek_UINT64(_s, _v) do { _v = \
|
#define stream_peek_UINT64(_s, _v) do { _v = \
|
||||||
(UINT64)(*_s->p) + \
|
(UINT64)(*_s->pointer) + \
|
||||||
(((UINT64)(*(_s->p + 1))) << 8) + \
|
(((UINT64)(*(_s->pointer + 1))) << 8) + \
|
||||||
(((UINT64)(*(_s->p + 2))) << 16) + \
|
(((UINT64)(*(_s->pointer + 2))) << 16) + \
|
||||||
(((UINT64)(*(_s->p + 3))) << 24) + \
|
(((UINT64)(*(_s->pointer + 3))) << 24) + \
|
||||||
(((UINT64)(*(_s->p + 4))) << 32) + \
|
(((UINT64)(*(_s->pointer + 4))) << 32) + \
|
||||||
(((UINT64)(*(_s->p + 5))) << 40) + \
|
(((UINT64)(*(_s->pointer + 5))) << 40) + \
|
||||||
(((UINT64)(*(_s->p + 6))) << 48) + \
|
(((UINT64)(*(_s->pointer + 6))) << 48) + \
|
||||||
(((UINT64)(*(_s->p + 7))) << 56); \
|
(((UINT64)(*(_s->pointer + 7))) << 56); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define stream_seek_BYTE(_s) stream_seek(_s, 1)
|
#define stream_seek_BYTE(_s) stream_seek(_s, 1)
|
||||||
@ -152,28 +156,28 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size);
|
|||||||
#define stream_seek_UINT64(_s) stream_seek(_s, 8)
|
#define stream_seek_UINT64(_s) stream_seek(_s, 8)
|
||||||
|
|
||||||
#define stream_read_UINT16_be(_s, _v) do { _v = \
|
#define stream_read_UINT16_be(_s, _v) do { _v = \
|
||||||
(((UINT16)(*_s->p)) << 8) + \
|
(((UINT16)(*_s->pointer)) << 8) + \
|
||||||
(UINT16)(*(_s->p + 1)); \
|
(UINT16)(*(_s->pointer + 1)); \
|
||||||
_s->p += 2; } while (0)
|
_s->pointer += 2; } while (0)
|
||||||
#define stream_read_UINT32_be(_s, _v) do { _v = \
|
#define stream_read_UINT32_be(_s, _v) do { _v = \
|
||||||
(((UINT32)(*(_s->p))) << 24) + \
|
(((UINT32)(*(_s->pointer))) << 24) + \
|
||||||
(((UINT32)(*(_s->p + 1))) << 16) + \
|
(((UINT32)(*(_s->pointer + 1))) << 16) + \
|
||||||
(((UINT32)(*(_s->p + 2))) << 8) + \
|
(((UINT32)(*(_s->pointer + 2))) << 8) + \
|
||||||
(((UINT32)(*(_s->p + 3)))); \
|
(((UINT32)(*(_s->pointer + 3)))); \
|
||||||
_s->p += 4; } while (0)
|
_s->pointer += 4; } while (0)
|
||||||
|
|
||||||
#define stream_write_UINT16_be(_s, _v) do { \
|
#define stream_write_UINT16_be(_s, _v) do { \
|
||||||
*_s->p++ = ((_v) >> 8) & 0xFF; \
|
*_s->pointer++ = ((_v) >> 8) & 0xFF; \
|
||||||
*_s->p++ = (_v) & 0xFF; } while (0)
|
*_s->pointer++ = (_v) & 0xFF; } while (0)
|
||||||
#define stream_write_UINT32_be(_s, _v) do { \
|
#define stream_write_UINT32_be(_s, _v) do { \
|
||||||
stream_write_UINT16_be(_s, ((_v) >> 16 & 0xFFFF)); \
|
stream_write_UINT16_be(_s, ((_v) >> 16 & 0xFFFF)); \
|
||||||
stream_write_UINT16_be(_s, ((_v) & 0xFFFF)); \
|
stream_write_UINT16_be(_s, ((_v) & 0xFFFF)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define stream_copy(_dst, _src, _n) do { \
|
#define stream_copy(_dst, _src, _n) do { \
|
||||||
memcpy(_dst->p, _src->p, _n); \
|
memcpy(_dst->pointer, _src->pointer, _n); \
|
||||||
_dst->p += _n; \
|
_dst->pointer += _n; \
|
||||||
_src->p += _n; \
|
_src->pointer += _n; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static INLINE BOOL stream_skip(STREAM* s, int sz) {
|
static INLINE BOOL stream_skip(STREAM* s, int sz) {
|
||||||
|
@ -165,22 +165,22 @@ BOOL rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in,
|
|||||||
|
|
||||||
params[0].context = context;
|
params[0].context = context;
|
||||||
params[0].quantization_values = y_quants;
|
params[0].quantization_values = y_quants;
|
||||||
params[0].data = stream_get_tail(data_in);
|
params[0].buffer = stream_get_tail(data_in);
|
||||||
params[0].size = y_size;
|
params[0].capacity = y_size;
|
||||||
params[0].buffer = pSrcDst[0];
|
params[0].buffer = pSrcDst[0];
|
||||||
stream_seek(data_in, y_size);
|
stream_seek(data_in, y_size);
|
||||||
|
|
||||||
params[1].context = context;
|
params[1].context = context;
|
||||||
params[1].quantization_values = cb_quants;
|
params[1].quantization_values = cb_quants;
|
||||||
params[1].data = stream_get_tail(data_in);
|
params[1].buffer = stream_get_tail(data_in);
|
||||||
params[1].size = cb_size;
|
params[1].capacity = cb_size;
|
||||||
params[1].buffer = pSrcDst[1];
|
params[1].buffer = pSrcDst[1];
|
||||||
stream_seek(data_in, cb_size);
|
stream_seek(data_in, cb_size);
|
||||||
|
|
||||||
params[2].context = context;
|
params[2].context = context;
|
||||||
params[2].quantization_values = cr_quants;
|
params[2].quantization_values = cr_quants;
|
||||||
params[2].data = stream_get_tail(data_in);
|
params[2].buffer = stream_get_tail(data_in);
|
||||||
params[2].size = cr_size;
|
params[2].capacity = cr_size;
|
||||||
params[2].buffer = pSrcDst[2];
|
params[2].buffer = pSrcDst[2];
|
||||||
stream_seek(data_in, cr_size);
|
stream_seek(data_in, cr_size);
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ void rdp_capability_set_finish(STREAM* s, BYTE* header, UINT16 type)
|
|||||||
UINT16 length;
|
UINT16 length;
|
||||||
BYTE* footer;
|
BYTE* footer;
|
||||||
|
|
||||||
footer = s->p;
|
footer = s->pointer;
|
||||||
length = footer - header;
|
length = footer - header;
|
||||||
stream_set_mark(s, header);
|
stream_set_mark(s, header);
|
||||||
|
|
||||||
@ -3010,10 +3010,10 @@ BOOL rdp_print_capability_sets(STREAM* s, UINT16 numberCapabilities, BOOL receiv
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->p != em)
|
if (s->pointer != em)
|
||||||
{
|
{
|
||||||
printf("incorrect offset, type:0x%02X actual:%d expected:%d\n",
|
printf("incorrect offset, type:0x%02X actual:%d expected:%d\n",
|
||||||
type, (int) (s->p - bm), (int) (em - bm));
|
type, (int) (s->pointer - bm), (int) (em - bm));
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_set_mark(s, em);
|
stream_set_mark(s, em);
|
||||||
@ -3201,10 +3201,10 @@ BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, UINT16 numberCap
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->p != em)
|
if (s->pointer != em)
|
||||||
{
|
{
|
||||||
printf("incorrect offset, type:0x%02X actual:%d expected:%d\n",
|
printf("incorrect offset, type:0x%02X actual:%d expected:%d\n",
|
||||||
type, (int) (s->p - bm), (int) (em - bm));
|
type, (int) (s->pointer - bm), (int) (em - bm));
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_set_mark(s, em);
|
stream_set_mark(s, em);
|
||||||
|
@ -207,7 +207,7 @@ static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 s
|
|||||||
|
|
||||||
#ifdef WITH_DEBUG_RDP
|
#ifdef WITH_DEBUG_RDP
|
||||||
DEBUG_RDP("recv Fast-Path %s Update (0x%X), length:%d",
|
DEBUG_RDP("recv Fast-Path %s Update (0x%X), length:%d",
|
||||||
updateCode < ARRAYSIZE(FASTPATH_UPDATETYPE_STRINGS) ? FASTPATH_UPDATETYPE_STRINGS[updateCode] : "???", updateCode, size);
|
updateCode < ARRAYSIZE(FASTPATH_UPDATETYPE_STRINGS) ? FASTPATH_UPDATETYPE_STRINGS[updateCode] : "???", updateCode, capacity);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (updateCode)
|
switch (updateCode)
|
||||||
@ -312,13 +312,13 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s)
|
|||||||
|
|
||||||
if (compressionFlags & PACKET_COMPRESSED)
|
if (compressionFlags & PACKET_COMPRESSED)
|
||||||
{
|
{
|
||||||
if (decompress_rdp(rdp->mppc_dec, s->p, size, compressionFlags, &roff, &rlen))
|
if (decompress_rdp(rdp->mppc_dec, s->pointer, size, compressionFlags, &roff, &rlen))
|
||||||
{
|
{
|
||||||
comp_stream = stream_new(0);
|
comp_stream = stream_new(0);
|
||||||
comp_stream->data = rdp->mppc_dec->history_buf + roff;
|
comp_stream->buffer = rdp->mppc_dec->history_buf + roff;
|
||||||
comp_stream->p = comp_stream->data;
|
comp_stream->pointer = comp_stream->buffer;
|
||||||
comp_stream->size = rlen;
|
comp_stream->capacity = rlen;
|
||||||
size = comp_stream->size;
|
size = comp_stream->capacity;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -708,7 +708,7 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s)
|
|||||||
pdu_data_bytes = dlen;
|
pdu_data_bytes = dlen;
|
||||||
if (try_comp)
|
if (try_comp)
|
||||||
{
|
{
|
||||||
if (compress_rdp(rdp->mppc_enc, ls->p + header_bytes, dlen))
|
if (compress_rdp(rdp->mppc_enc, ls->pointer + header_bytes, dlen))
|
||||||
{
|
{
|
||||||
if (rdp->mppc_enc->flags & PACKET_COMPRESSED)
|
if (rdp->mppc_enc->flags & PACKET_COMPRESSED)
|
||||||
{
|
{
|
||||||
|
@ -135,19 +135,19 @@ BOOL freerdp_connect(freerdp* instance)
|
|||||||
{
|
{
|
||||||
pcap_get_next_record_header(update->pcap_rfx, &record);
|
pcap_get_next_record_header(update->pcap_rfx, &record);
|
||||||
|
|
||||||
s->data = (BYTE*) realloc(s->data, record.length);
|
s->buffer = (BYTE*) realloc(s->buffer, record.length);
|
||||||
record.data = s->data;
|
record.data = s->buffer;
|
||||||
s->size = record.length;
|
s->capacity = record.length;
|
||||||
|
|
||||||
pcap_get_next_record_content(update->pcap_rfx, &record);
|
pcap_get_next_record_content(update->pcap_rfx, &record);
|
||||||
stream_set_pos(s, 0);
|
stream_set_pos(s, 0);
|
||||||
|
|
||||||
update->BeginPaint(update->context);
|
update->BeginPaint(update->context);
|
||||||
update_recv_surfcmds(update, s->size, s);
|
update_recv_surfcmds(update, s->capacity, s);
|
||||||
update->EndPaint(update->context);
|
update->EndPaint(update->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(s->data);
|
free(s->buffer);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ void gcc_write_conference_create_request(STREAM* s, STREAM* user_data)
|
|||||||
per_write_octet_string(s, h221_cs_key, 4, 4); /* h221NonStandard, client-to-server H.221 key, "Duca" */
|
per_write_octet_string(s, h221_cs_key, 4, 4); /* h221NonStandard, client-to-server H.221 key, "Duca" */
|
||||||
|
|
||||||
/* userData::value (OCTET_STRING) */
|
/* userData::value (OCTET_STRING) */
|
||||||
per_write_octet_string(s, user_data->data, stream_get_length(user_data), 0); /* array of client data blocks */
|
per_write_octet_string(s, user_data->buffer, stream_get_length(user_data), 0); /* array of client data blocks */
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings)
|
BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings)
|
||||||
@ -302,7 +302,7 @@ void gcc_write_conference_create_response(STREAM* s, STREAM* user_data)
|
|||||||
per_write_octet_string(s, h221_sc_key, 4, 4); /* h221NonStandard, server-to-client H.221 key, "McDn" */
|
per_write_octet_string(s, h221_sc_key, 4, 4); /* h221NonStandard, server-to-client H.221 key, "McDn" */
|
||||||
|
|
||||||
/* userData (OCTET_STRING) */
|
/* userData (OCTET_STRING) */
|
||||||
per_write_octet_string(s, user_data->data, stream_get_length(user_data), 0); /* array of server data blocks */
|
per_write_octet_string(s, user_data->buffer, stream_get_length(user_data), 0); /* array of server data blocks */
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings* settings, int length)
|
BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings* settings, int length)
|
||||||
@ -399,7 +399,7 @@ BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length)
|
|||||||
|
|
||||||
while (offset < length)
|
while (offset < length)
|
||||||
{
|
{
|
||||||
holdp = s->p;
|
holdp = s->pointer;
|
||||||
|
|
||||||
if (!gcc_read_user_data_header(s, &type, &blockLength))
|
if (!gcc_read_user_data_header(s, &type, &blockLength))
|
||||||
{
|
{
|
||||||
@ -438,7 +438,7 @@ BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
offset += blockLength;
|
offset += blockLength;
|
||||||
s->p = holdp + blockLength;
|
s->pointer = holdp + blockLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -107,7 +107,7 @@ void license_print_scope_list(SCOPE_LIST* scopeList)
|
|||||||
for (index = 0; index < scopeList->count; index++)
|
for (index = 0; index < scopeList->count; index++)
|
||||||
{
|
{
|
||||||
scope = &scopeList->array[index];
|
scope = &scopeList->array[index];
|
||||||
printf("\t%s\n", (char*) scope->data);
|
printf("\t%s\n", (char*) scope->buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ BOOL license_send(rdpLicense* license, STREAM* s, BYTE type)
|
|||||||
|
|
||||||
#ifdef WITH_DEBUG_LICENSE
|
#ifdef WITH_DEBUG_LICENSE
|
||||||
printf("Sending %s Packet, length %d\n", LICENSE_MESSAGE_STRINGS[type & 0x1F], wMsgSize);
|
printf("Sending %s Packet, length %d\n", LICENSE_MESSAGE_STRINGS[type & 0x1F], wMsgSize);
|
||||||
winpr_HexDump(s->p - 4, wMsgSize);
|
winpr_HexDump(s->pointer - 4, wMsgSize);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
stream_set_pos(s, length);
|
stream_set_pos(s, length);
|
||||||
@ -803,11 +803,11 @@ BOOL license_read_platform_challenge_packet(rdpLicense* license, STREAM* s)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("EncryptedPlatformChallenge:\n");
|
printf("EncryptedPlatformChallenge:\n");
|
||||||
winpr_HexDump(license->EncryptedPlatformChallenge->data, license->EncryptedPlatformChallenge->length);
|
winpr_HexDump(license->EncryptedPlatformChallenge->buffer, license->EncryptedPlatformChallenge->length);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("PlatformChallenge:\n");
|
printf("PlatformChallenge:\n");
|
||||||
winpr_HexDump(license->PlatformChallenge->data, license->PlatformChallenge->length);
|
winpr_HexDump(license->PlatformChallenge->buffer, license->PlatformChallenge->length);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("MacData:\n");
|
printf("MacData:\n");
|
||||||
@ -930,13 +930,13 @@ void license_write_new_license_request_packet(rdpLicense* license, STREAM* s)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("EncryptedPremasterSecret\n");
|
printf("EncryptedPremasterSecret\n");
|
||||||
winpr_HexDump(license->EncryptedPremasterSecret->data, license->EncryptedPremasterSecret->length);
|
winpr_HexDump(license->EncryptedPremasterSecret->buffer, license->EncryptedPremasterSecret->length);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("ClientUserName (%d): %s\n", license->ClientUserName->length, (char*) license->ClientUserName->data);
|
printf("ClientUserName (%d): %s\n", license->ClientUserName->length, (char*) license->ClientUserName->buffer);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("ClientMachineName (%d): %s\n", license->ClientMachineName->length, (char*) license->ClientMachineName->data);
|
printf("ClientMachineName (%d): %s\n", license->ClientMachineName->length, (char*) license->ClientMachineName->buffer);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1039,7 +1039,7 @@ void license_send_platform_challenge_response_packet(rdpLicense* license)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("EncryptedHardwareId:\n");
|
printf("EncryptedHardwareId:\n");
|
||||||
winpr_HexDump(license->EncryptedHardwareId->data, 20);
|
winpr_HexDump(license->EncryptedHardwareId->buffer, 20);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ void mcs_write_connect_initial(STREAM* s, rdpMcs* mcs, STREAM* user_data)
|
|||||||
mcs_write_domain_parameters(tmps, &mcs->maximumParameters);
|
mcs_write_domain_parameters(tmps, &mcs->maximumParameters);
|
||||||
|
|
||||||
/* userData (OCTET_STRING) */
|
/* userData (OCTET_STRING) */
|
||||||
ber_write_octet_string(tmps, user_data->data, stream_get_length(user_data));
|
ber_write_octet_string(tmps, user_data->buffer, stream_get_length(user_data));
|
||||||
|
|
||||||
length = stream_get_length(tmps);
|
length = stream_get_length(tmps);
|
||||||
/* Connect-Initial (APPLICATION 101, IMPLICIT SEQUENCE) */
|
/* Connect-Initial (APPLICATION 101, IMPLICIT SEQUENCE) */
|
||||||
@ -437,7 +437,7 @@ void mcs_write_connect_response(STREAM* s, rdpMcs* mcs, STREAM* user_data)
|
|||||||
mcs->domainParameters = mcs->targetParameters;
|
mcs->domainParameters = mcs->targetParameters;
|
||||||
mcs_write_domain_parameters(tmps, &(mcs->domainParameters));
|
mcs_write_domain_parameters(tmps, &(mcs->domainParameters));
|
||||||
/* userData (OCTET_STRING) */
|
/* userData (OCTET_STRING) */
|
||||||
ber_write_octet_string(tmps, user_data->data, stream_get_length(user_data));
|
ber_write_octet_string(tmps, user_data->buffer, stream_get_length(user_data));
|
||||||
|
|
||||||
length = stream_get_length(tmps);
|
length = stream_get_length(tmps);
|
||||||
ber_write_application_tag(s, MCS_TYPE_CONNECT_RESPONSE, length);
|
ber_write_application_tag(s, MCS_TYPE_CONNECT_RESPONSE, length);
|
||||||
|
@ -145,9 +145,9 @@ static void update_message_SurfaceCommand(rdpContext* context, STREAM* s)
|
|||||||
|
|
||||||
wParam = (STREAM*) malloc(sizeof(STREAM));
|
wParam = (STREAM*) malloc(sizeof(STREAM));
|
||||||
|
|
||||||
wParam->size = s->size;
|
wParam->capacity = s->capacity;
|
||||||
wParam->data = (BYTE*) malloc(wParam->size);
|
wParam->buffer = (BYTE*) malloc(wParam->capacity);
|
||||||
wParam->p = wParam->data;
|
wParam->pointer = wParam->buffer;
|
||||||
|
|
||||||
MessageQueue_Post(context->update->queue, (void*) context,
|
MessageQueue_Post(context->update->queue, (void*) context,
|
||||||
MakeMessageId(Update, SurfaceCommand), (void*) wParam, NULL);
|
MakeMessageId(Update, SurfaceCommand), (void*) wParam, NULL);
|
||||||
@ -985,7 +985,7 @@ int update_message_process_update_class(rdpUpdateProxy* proxy, wMessage* msg, in
|
|||||||
IFCALL(proxy->SurfaceCommand, msg->context, (STREAM*) msg->wParam);
|
IFCALL(proxy->SurfaceCommand, msg->context, (STREAM*) msg->wParam);
|
||||||
{
|
{
|
||||||
STREAM* s = (STREAM*) msg->wParam;
|
STREAM* s = (STREAM*) msg->wParam;
|
||||||
free(s->data);
|
free(s->buffer);
|
||||||
free(s);
|
free(s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -817,7 +817,7 @@ void credssp_read_ts_password_creds(rdpCredssp* credssp, STREAM* s)
|
|||||||
ber_read_octet_string_tag(s, &length);
|
ber_read_octet_string_tag(s, &length);
|
||||||
credssp->identity.DomainLength = (UINT32) length;
|
credssp->identity.DomainLength = (UINT32) length;
|
||||||
credssp->identity.Domain = (UINT16*) malloc(length);
|
credssp->identity.Domain = (UINT16*) malloc(length);
|
||||||
CopyMemory(credssp->identity.Domain, s->p, credssp->identity.DomainLength);
|
CopyMemory(credssp->identity.Domain, s->pointer, credssp->identity.DomainLength);
|
||||||
stream_seek(s, credssp->identity.DomainLength);
|
stream_seek(s, credssp->identity.DomainLength);
|
||||||
credssp->identity.DomainLength /= 2;
|
credssp->identity.DomainLength /= 2;
|
||||||
|
|
||||||
@ -826,7 +826,7 @@ void credssp_read_ts_password_creds(rdpCredssp* credssp, STREAM* s)
|
|||||||
ber_read_octet_string_tag(s, &length);
|
ber_read_octet_string_tag(s, &length);
|
||||||
credssp->identity.UserLength = (UINT32) length;
|
credssp->identity.UserLength = (UINT32) length;
|
||||||
credssp->identity.User = (UINT16*) malloc(length);
|
credssp->identity.User = (UINT16*) malloc(length);
|
||||||
CopyMemory(credssp->identity.User, s->p, credssp->identity.UserLength);
|
CopyMemory(credssp->identity.User, s->pointer, credssp->identity.UserLength);
|
||||||
stream_seek(s, credssp->identity.UserLength);
|
stream_seek(s, credssp->identity.UserLength);
|
||||||
credssp->identity.UserLength /= 2;
|
credssp->identity.UserLength /= 2;
|
||||||
|
|
||||||
@ -835,7 +835,7 @@ void credssp_read_ts_password_creds(rdpCredssp* credssp, STREAM* s)
|
|||||||
ber_read_octet_string_tag(s, &length);
|
ber_read_octet_string_tag(s, &length);
|
||||||
credssp->identity.PasswordLength = (UINT32) length;
|
credssp->identity.PasswordLength = (UINT32) length;
|
||||||
credssp->identity.Password = (UINT16*) malloc(length);
|
credssp->identity.Password = (UINT16*) malloc(length);
|
||||||
CopyMemory(credssp->identity.Password, s->p, credssp->identity.PasswordLength);
|
CopyMemory(credssp->identity.Password, s->pointer, credssp->identity.PasswordLength);
|
||||||
stream_seek(s, credssp->identity.PasswordLength);
|
stream_seek(s, credssp->identity.PasswordLength);
|
||||||
credssp->identity.PasswordLength /= 2;
|
credssp->identity.PasswordLength /= 2;
|
||||||
|
|
||||||
@ -1148,7 +1148,7 @@ int credssp_recv(rdpCredssp* credssp)
|
|||||||
s = stream_new(4096);
|
s = stream_new(4096);
|
||||||
|
|
||||||
status = transport_read(credssp->transport, s);
|
status = transport_read(credssp->transport, s);
|
||||||
s->size = status;
|
s->capacity = status;
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
{
|
{
|
||||||
|
@ -903,7 +903,7 @@ BOOL update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX
|
|||||||
|
|
||||||
if (stream_get_left(s) < glyph_index->cbData)
|
if (stream_get_left(s) < glyph_index->cbData)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
memcpy(glyph_index->data, s->p, glyph_index->cbData);
|
memcpy(glyph_index->data, s->pointer, glyph_index->cbData);
|
||||||
stream_seek(s, glyph_index->cbData);
|
stream_seek(s, glyph_index->cbData);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -934,7 +934,7 @@ BOOL update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_O
|
|||||||
|
|
||||||
if (stream_get_left(s) < fast_index->cbData)
|
if (stream_get_left(s) < fast_index->cbData)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
memcpy(fast_index->data, s->p, fast_index->cbData);
|
memcpy(fast_index->data, s->pointer, fast_index->cbData);
|
||||||
stream_seek(s, fast_index->cbData);
|
stream_seek(s, fast_index->cbData);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -970,8 +970,8 @@ BOOL update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O
|
|||||||
if (stream_get_left(s) < fast_glyph->cbData)
|
if (stream_get_left(s) < fast_glyph->cbData)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
memcpy(fast_glyph->data, s->p, fast_glyph->cbData);
|
memcpy(fast_glyph->data, s->pointer, fast_glyph->cbData);
|
||||||
phold = s->p;
|
phold = s->pointer;
|
||||||
|
|
||||||
if (!stream_skip(s, 1))
|
if (!stream_skip(s, 1))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -998,7 +998,7 @@ BOOL update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O
|
|||||||
stream_read(s, glyph->aj, glyph->cb);
|
stream_read(s, glyph->aj, glyph->cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
s->p = phold + fast_glyph->cbData;
|
s->pointer = phold + fast_glyph->cbData;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1363,7 +1363,7 @@ BOOL update_decompress_brush(STREAM* s, BYTE* output, BYTE bpp)
|
|||||||
BYTE* palette;
|
BYTE* palette;
|
||||||
int bytesPerPixel;
|
int bytesPerPixel;
|
||||||
|
|
||||||
palette = s->p + 16;
|
palette = s->pointer + 16;
|
||||||
bytesPerPixel = ((bpp + 1) / 8);
|
bytesPerPixel = ((bpp + 1) / 8);
|
||||||
|
|
||||||
if (stream_get_left(s) < 16) // 64 / 4
|
if (stream_get_left(s) < 16) // 64 / 4
|
||||||
@ -1929,7 +1929,7 @@ BOOL update_recv_secondary_order(rdpUpdate* update, STREAM* s, BYTE flags)
|
|||||||
stream_read_UINT16(s, extraFlags); /* extraFlags (2 bytes) */
|
stream_read_UINT16(s, extraFlags); /* extraFlags (2 bytes) */
|
||||||
stream_read_BYTE(s, orderType); /* orderType (1 byte) */
|
stream_read_BYTE(s, orderType); /* orderType (1 byte) */
|
||||||
|
|
||||||
next = s->p + ((INT16) orderLength) + 7;
|
next = s->pointer + ((INT16) orderLength) + 7;
|
||||||
|
|
||||||
#ifdef WITH_DEBUG_ORDERS
|
#ifdef WITH_DEBUG_ORDERS
|
||||||
if (orderType < SECONDARY_DRAWING_ORDER_COUNT)
|
if (orderType < SECONDARY_DRAWING_ORDER_COUNT)
|
||||||
@ -2001,7 +2001,7 @@ BOOL update_recv_secondary_order(rdpUpdate* update, STREAM* s, BYTE flags)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->p = next;
|
s->pointer = next;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,9 +332,9 @@ static UINT32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length)
|
|||||||
{
|
{
|
||||||
if (rdp->settings->EncryptionMethods == ENCRYPTION_METHOD_FIPS)
|
if (rdp->settings->EncryptionMethods == ENCRYPTION_METHOD_FIPS)
|
||||||
{
|
{
|
||||||
data = s->p + 12;
|
data = s->pointer + 12;
|
||||||
|
|
||||||
length = length - (data - s->data);
|
length = length - (data - s->buffer);
|
||||||
stream_write_UINT16(s, 0x10); /* length */
|
stream_write_UINT16(s, 0x10); /* length */
|
||||||
stream_write_BYTE(s, 0x1); /* TSFIPS_VERSION 1*/
|
stream_write_BYTE(s, 0x1); /* TSFIPS_VERSION 1*/
|
||||||
|
|
||||||
@ -348,20 +348,20 @@ static UINT32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length)
|
|||||||
|
|
||||||
stream_write_BYTE(s, pad);
|
stream_write_BYTE(s, pad);
|
||||||
|
|
||||||
security_hmac_signature(data, length, s->p, rdp);
|
security_hmac_signature(data, length, s->pointer, rdp);
|
||||||
stream_seek(s, 8);
|
stream_seek(s, 8);
|
||||||
security_fips_encrypt(data, length + pad, rdp);
|
security_fips_encrypt(data, length + pad, rdp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data = s->p + 8;
|
data = s->pointer + 8;
|
||||||
length = length - (data - s->data);
|
length = length - (data - s->buffer);
|
||||||
if (sec_flags & SEC_SECURE_CHECKSUM)
|
if (sec_flags & SEC_SECURE_CHECKSUM)
|
||||||
security_salted_mac_signature(rdp, data, length, TRUE, s->p);
|
security_salted_mac_signature(rdp, data, length, TRUE, s->pointer);
|
||||||
else
|
else
|
||||||
security_mac_signature(rdp, data, length, s->p);
|
security_mac_signature(rdp, data, length, s->pointer);
|
||||||
stream_seek(s, 8);
|
stream_seek(s, 8);
|
||||||
security_encrypt(s->p, length, rdp);
|
security_encrypt(s->pointer, length, rdp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,10 +413,10 @@ BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id)
|
|||||||
rdp_write_header(rdp, s, length, channel_id);
|
rdp_write_header(rdp, s, length, channel_id);
|
||||||
|
|
||||||
sec_bytes = rdp_get_sec_bytes(rdp);
|
sec_bytes = rdp_get_sec_bytes(rdp);
|
||||||
sec_hold = s->p;
|
sec_hold = s->pointer;
|
||||||
stream_seek(s, sec_bytes);
|
stream_seek(s, sec_bytes);
|
||||||
|
|
||||||
s->p = sec_hold;
|
s->pointer = sec_hold;
|
||||||
length += rdp_security_stream_out(rdp, s, length);
|
length += rdp_security_stream_out(rdp, s, length);
|
||||||
|
|
||||||
stream_set_pos(s, length);
|
stream_set_pos(s, length);
|
||||||
@ -439,12 +439,12 @@ BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id)
|
|||||||
rdp_write_header(rdp, s, length, MCS_GLOBAL_CHANNEL_ID);
|
rdp_write_header(rdp, s, length, MCS_GLOBAL_CHANNEL_ID);
|
||||||
|
|
||||||
sec_bytes = rdp_get_sec_bytes(rdp);
|
sec_bytes = rdp_get_sec_bytes(rdp);
|
||||||
sec_hold = s->p;
|
sec_hold = s->pointer;
|
||||||
stream_seek(s, sec_bytes);
|
stream_seek(s, sec_bytes);
|
||||||
|
|
||||||
rdp_write_share_control_header(s, length - sec_bytes, type, channel_id);
|
rdp_write_share_control_header(s, length - sec_bytes, type, channel_id);
|
||||||
|
|
||||||
s->p = sec_hold;
|
s->pointer = sec_hold;
|
||||||
length += rdp_security_stream_out(rdp, s, length);
|
length += rdp_security_stream_out(rdp, s, length);
|
||||||
|
|
||||||
stream_set_pos(s, length);
|
stream_set_pos(s, length);
|
||||||
@ -466,13 +466,13 @@ BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id)
|
|||||||
rdp_write_header(rdp, s, length, MCS_GLOBAL_CHANNEL_ID);
|
rdp_write_header(rdp, s, length, MCS_GLOBAL_CHANNEL_ID);
|
||||||
|
|
||||||
sec_bytes = rdp_get_sec_bytes(rdp);
|
sec_bytes = rdp_get_sec_bytes(rdp);
|
||||||
sec_hold = s->p;
|
sec_hold = s->pointer;
|
||||||
stream_seek(s, sec_bytes);
|
stream_seek(s, sec_bytes);
|
||||||
|
|
||||||
rdp_write_share_control_header(s, length - sec_bytes, PDU_TYPE_DATA, channel_id);
|
rdp_write_share_control_header(s, length - sec_bytes, PDU_TYPE_DATA, channel_id);
|
||||||
rdp_write_share_data_header(s, length - sec_bytes, type, rdp->settings->ShareId);
|
rdp_write_share_data_header(s, length - sec_bytes, type, rdp->settings->ShareId);
|
||||||
|
|
||||||
s->p = sec_hold;
|
s->pointer = sec_hold;
|
||||||
length += rdp_security_stream_out(rdp, s, length);
|
length += rdp_security_stream_out(rdp, s, length);
|
||||||
|
|
||||||
stream_set_pos(s, length);
|
stream_set_pos(s, length);
|
||||||
@ -518,12 +518,12 @@ int rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
|
|||||||
printf("decompress_rdp: not enough bytes for compressed_len=%d\n", compressed_len);
|
printf("decompress_rdp: not enough bytes for compressed_len=%d\n", compressed_len);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (decompress_rdp(rdp->mppc_dec, s->p, compressed_len - 18, compressed_type, &roff, &rlen))
|
if (decompress_rdp(rdp->mppc_dec, s->pointer, compressed_len - 18, compressed_type, &roff, &rlen))
|
||||||
{
|
{
|
||||||
comp_stream = stream_new(0);
|
comp_stream = stream_new(0);
|
||||||
comp_stream->data = rdp->mppc_dec->history_buf + roff;
|
comp_stream->buffer = rdp->mppc_dec->history_buf + roff;
|
||||||
comp_stream->p = comp_stream->data;
|
comp_stream->pointer = comp_stream->buffer;
|
||||||
comp_stream->size = rlen;
|
comp_stream->capacity = rlen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -690,25 +690,25 @@ BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags)
|
|||||||
stream_read_BYTE(s, version); /* 0x1 */
|
stream_read_BYTE(s, version); /* 0x1 */
|
||||||
stream_read_BYTE(s, pad);
|
stream_read_BYTE(s, pad);
|
||||||
|
|
||||||
sig = s->p;
|
sig = s->pointer;
|
||||||
stream_seek(s, 8); /* signature */
|
stream_seek(s, 8); /* signature */
|
||||||
|
|
||||||
length -= 12;
|
length -= 12;
|
||||||
|
|
||||||
if (!security_fips_decrypt(s->p, length, rdp))
|
if (!security_fips_decrypt(s->pointer, length, rdp))
|
||||||
{
|
{
|
||||||
printf("FATAL: cannot decrypt\n");
|
printf("FATAL: cannot decrypt\n");
|
||||||
return FALSE; /* TODO */
|
return FALSE; /* TODO */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!security_fips_check_signature(s->p, length - pad, sig, rdp))
|
if (!security_fips_check_signature(s->pointer, length - pad, sig, rdp))
|
||||||
{
|
{
|
||||||
printf("FATAL: invalid packet signature\n");
|
printf("FATAL: invalid packet signature\n");
|
||||||
return FALSE; /* TODO */
|
return FALSE; /* TODO */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* is this what needs adjusting? */
|
/* is this what needs adjusting? */
|
||||||
s->size -= pad;
|
s->capacity -= pad;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -717,13 +717,13 @@ BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags)
|
|||||||
|
|
||||||
stream_read(s, wmac, sizeof(wmac));
|
stream_read(s, wmac, sizeof(wmac));
|
||||||
length -= sizeof(wmac);
|
length -= sizeof(wmac);
|
||||||
if (!security_decrypt(s->p, length, rdp))
|
if (!security_decrypt(s->pointer, length, rdp))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (securityFlags & SEC_SECURE_CHECKSUM)
|
if (securityFlags & SEC_SECURE_CHECKSUM)
|
||||||
security_salted_mac_signature(rdp, s->p, length, FALSE, cmac);
|
security_salted_mac_signature(rdp, s->pointer, length, FALSE, cmac);
|
||||||
else
|
else
|
||||||
security_mac_signature(rdp, s->p, length, cmac);
|
security_mac_signature(rdp, s->pointer, length, cmac);
|
||||||
|
|
||||||
if (memcmp(wmac, cmac, sizeof(wmac)) != 0)
|
if (memcmp(wmac, cmac, sizeof(wmac)) != 0)
|
||||||
{
|
{
|
||||||
@ -783,7 +783,7 @@ static int rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
|
|||||||
* [MS-RDPBCGR] 2.2.13.2.1
|
* [MS-RDPBCGR] 2.2.13.2.1
|
||||||
* - no share control header, nor the 2 byte pad
|
* - no share control header, nor the 2 byte pad
|
||||||
*/
|
*/
|
||||||
s->p -= 2;
|
s->pointer -= 2;
|
||||||
rdp_recv_enhanced_security_redirection_packet(rdp, s);
|
rdp_recv_enhanced_security_redirection_packet(rdp, s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ BOOL transport_accept_nla(rdpTransport* transport)
|
|||||||
|
|
||||||
BOOL nla_verify_header(STREAM* s)
|
BOOL nla_verify_header(STREAM* s)
|
||||||
{
|
{
|
||||||
if ((s->p[0] == 0x30) && (s->p[1] & 0x80))
|
if ((s->pointer[0] == 0x30) && (s->pointer[1] & 0x80))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -303,17 +303,17 @@ UINT32 nla_read_header(STREAM* s)
|
|||||||
{
|
{
|
||||||
UINT32 length = 0;
|
UINT32 length = 0;
|
||||||
|
|
||||||
if (s->p[1] & 0x80)
|
if (s->pointer[1] & 0x80)
|
||||||
{
|
{
|
||||||
if ((s->p[1] & ~(0x80)) == 1)
|
if ((s->pointer[1] & ~(0x80)) == 1)
|
||||||
{
|
{
|
||||||
length = s->p[2];
|
length = s->pointer[2];
|
||||||
length += 3;
|
length += 3;
|
||||||
stream_seek(s, 3);
|
stream_seek(s, 3);
|
||||||
}
|
}
|
||||||
else if ((s->p[1] & ~(0x80)) == 2)
|
else if ((s->pointer[1] & ~(0x80)) == 2)
|
||||||
{
|
{
|
||||||
length = (s->p[2] << 8) | s->p[3];
|
length = (s->pointer[2] << 8) | s->pointer[3];
|
||||||
length += 4;
|
length += 4;
|
||||||
stream_seek(s, 4);
|
stream_seek(s, 4);
|
||||||
}
|
}
|
||||||
@ -324,7 +324,7 @@ UINT32 nla_read_header(STREAM* s)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
length = s->p[1];
|
length = s->pointer[1];
|
||||||
length += 2;
|
length += 2;
|
||||||
stream_seek(s, 2);
|
stream_seek(s, 2);
|
||||||
}
|
}
|
||||||
@ -336,11 +336,11 @@ UINT32 nla_header_length(STREAM* s)
|
|||||||
{
|
{
|
||||||
UINT32 length = 0;
|
UINT32 length = 0;
|
||||||
|
|
||||||
if (s->p[1] & 0x80)
|
if (s->pointer[1] & 0x80)
|
||||||
{
|
{
|
||||||
if ((s->p[1] & ~(0x80)) == 1)
|
if ((s->pointer[1] & ~(0x80)) == 1)
|
||||||
length = 3;
|
length = 3;
|
||||||
else if ((s->p[1] & ~(0x80)) == 2)
|
else if ((s->pointer[1] & ~(0x80)) == 2)
|
||||||
length = 4;
|
length = 4;
|
||||||
else
|
else
|
||||||
printf("Error reading TSRequest!\n");
|
printf("Error reading TSRequest!\n");
|
||||||
@ -405,7 +405,7 @@ int transport_read(rdpTransport* transport, STREAM* s)
|
|||||||
|
|
||||||
if (stream_bytes < 4)
|
if (stream_bytes < 4)
|
||||||
{
|
{
|
||||||
status = transport_read_layer(transport, s->data + stream_bytes, 4 - stream_bytes);
|
status = transport_read_layer(transport, s->buffer + stream_bytes, 4 - stream_bytes);
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
return status;
|
return status;
|
||||||
@ -419,26 +419,26 @@ int transport_read(rdpTransport* transport, STREAM* s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* if header is present, read in exactly one PDU */
|
/* if header is present, read in exactly one PDU */
|
||||||
if (s->data[0] == 0x03)
|
if (s->buffer[0] == 0x03)
|
||||||
{
|
{
|
||||||
/* TPKT header */
|
/* TPKT header */
|
||||||
|
|
||||||
pdu_bytes = (s->data[2] << 8) | s->data[3];
|
pdu_bytes = (s->buffer[2] << 8) | s->buffer[3];
|
||||||
}
|
}
|
||||||
else if (s->data[0] == 0x30)
|
else if (s->buffer[0] == 0x30)
|
||||||
{
|
{
|
||||||
/* TSRequest (NLA) */
|
/* TSRequest (NLA) */
|
||||||
|
|
||||||
if (s->data[1] & 0x80)
|
if (s->buffer[1] & 0x80)
|
||||||
{
|
{
|
||||||
if ((s->data[1] & ~(0x80)) == 1)
|
if ((s->buffer[1] & ~(0x80)) == 1)
|
||||||
{
|
{
|
||||||
pdu_bytes = s->data[2];
|
pdu_bytes = s->buffer[2];
|
||||||
pdu_bytes += 3;
|
pdu_bytes += 3;
|
||||||
}
|
}
|
||||||
else if ((s->data[1] & ~(0x80)) == 2)
|
else if ((s->buffer[1] & ~(0x80)) == 2)
|
||||||
{
|
{
|
||||||
pdu_bytes = (s->data[2] << 8) | s->data[3];
|
pdu_bytes = (s->buffer[2] << 8) | s->buffer[3];
|
||||||
pdu_bytes += 4;
|
pdu_bytes += 4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -448,7 +448,7 @@ int transport_read(rdpTransport* transport, STREAM* s)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pdu_bytes = s->data[1];
|
pdu_bytes = s->buffer[1];
|
||||||
pdu_bytes += 2;
|
pdu_bytes += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -456,13 +456,13 @@ int transport_read(rdpTransport* transport, STREAM* s)
|
|||||||
{
|
{
|
||||||
/* Fast-Path Header */
|
/* Fast-Path Header */
|
||||||
|
|
||||||
if (s->data[1] & 0x80)
|
if (s->buffer[1] & 0x80)
|
||||||
pdu_bytes = ((s->data[1] & 0x7f) << 8) | s->data[2];
|
pdu_bytes = ((s->buffer[1] & 0x7f) << 8) | s->buffer[2];
|
||||||
else
|
else
|
||||||
pdu_bytes = s->data[1];
|
pdu_bytes = s->buffer[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
status = transport_read_layer(transport, s->data + stream_bytes, pdu_bytes - stream_bytes);
|
status = transport_read_layer(transport, s->buffer + stream_bytes, pdu_bytes - stream_bytes);
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
return status;
|
return status;
|
||||||
@ -474,7 +474,7 @@ int transport_read(rdpTransport* transport, STREAM* s)
|
|||||||
if (stream_bytes + status >= pdu_bytes)
|
if (stream_bytes + status >= pdu_bytes)
|
||||||
{
|
{
|
||||||
printf("Local < Remote\n");
|
printf("Local < Remote\n");
|
||||||
winpr_HexDump(s->data, pdu_bytes);
|
winpr_HexDump(s->buffer, pdu_bytes);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -508,7 +508,7 @@ int transport_write(rdpTransport* transport, STREAM* s)
|
|||||||
if (length > 0)
|
if (length > 0)
|
||||||
{
|
{
|
||||||
printf("Local > Remote\n");
|
printf("Local > Remote\n");
|
||||||
winpr_HexDump(s->data, length);
|
winpr_HexDump(s->buffer, length);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -680,7 +680,7 @@ int transport_check_fds(rdpTransport** ptransport)
|
|||||||
|
|
||||||
received = transport->ReceiveBuffer;
|
received = transport->ReceiveBuffer;
|
||||||
transport->ReceiveBuffer = ObjectPool_Take(transport->ReceivePool);
|
transport->ReceiveBuffer = ObjectPool_Take(transport->ReceivePool);
|
||||||
transport->ReceiveBuffer->p = transport->ReceiveBuffer->data;
|
transport->ReceiveBuffer->pointer = transport->ReceiveBuffer->buffer;
|
||||||
|
|
||||||
stream_set_pos(received, length);
|
stream_set_pos(received, length);
|
||||||
stream_seal(received);
|
stream_seal(received);
|
||||||
@ -741,7 +741,7 @@ STREAM* transport_receive_buffer_pool_new()
|
|||||||
STREAM* pdu = NULL;
|
STREAM* pdu = NULL;
|
||||||
|
|
||||||
pdu = stream_new(BUFFER_SIZE);
|
pdu = stream_new(BUFFER_SIZE);
|
||||||
pdu->p = pdu->data;
|
pdu->pointer = pdu->buffer;
|
||||||
|
|
||||||
return pdu;
|
return pdu;
|
||||||
}
|
}
|
||||||
|
@ -402,7 +402,7 @@ BOOL per_read_octet_string(STREAM* s, BYTE* oct_str, int length, int min)
|
|||||||
if (stream_get_left(s) < length)
|
if (stream_get_left(s) < length)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
a_oct_str = s->p;
|
a_oct_str = s->pointer;
|
||||||
stream_seek(s, length);
|
stream_seek(s, length);
|
||||||
|
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
|
@ -58,10 +58,10 @@ STREAM* stream_new(int size)
|
|||||||
if (size != 0)
|
if (size != 0)
|
||||||
{
|
{
|
||||||
size = size > 0 ? size : 0x400;
|
size = size > 0 ? size : 0x400;
|
||||||
stream->data = (BYTE*) malloc(size);
|
stream->buffer = (BYTE*) malloc(size);
|
||||||
ZeroMemory(stream->data, size);
|
ZeroMemory(stream->buffer, size);
|
||||||
stream->p = stream->data;
|
stream->pointer = stream->buffer;
|
||||||
stream->size = size;
|
stream->capacity = size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,8 +81,8 @@ void stream_free(STREAM* stream)
|
|||||||
{
|
{
|
||||||
if (stream != NULL)
|
if (stream != NULL)
|
||||||
{
|
{
|
||||||
if (stream->data != NULL)
|
if (stream->buffer != NULL)
|
||||||
free(stream->data);
|
free(stream->buffer);
|
||||||
|
|
||||||
free(stream);
|
free(stream);
|
||||||
}
|
}
|
||||||
@ -105,15 +105,15 @@ void stream_extend(STREAM* stream, int request_size)
|
|||||||
int increased_size;
|
int increased_size;
|
||||||
|
|
||||||
pos = stream_get_pos(stream);
|
pos = stream_get_pos(stream);
|
||||||
original_size = stream->size;
|
original_size = stream->capacity;
|
||||||
increased_size = (request_size > original_size ? request_size : original_size);
|
increased_size = (request_size > original_size ? request_size : original_size);
|
||||||
stream->size += increased_size;
|
stream->capacity += increased_size;
|
||||||
|
|
||||||
if (original_size == 0)
|
if (original_size == 0)
|
||||||
stream->data = (BYTE*) malloc(stream->size);
|
stream->buffer = (BYTE*) malloc(stream->capacity);
|
||||||
else
|
else
|
||||||
stream->data = (BYTE*) realloc(stream->data, stream->size);
|
stream->buffer = (BYTE*) realloc(stream->buffer, stream->capacity);
|
||||||
|
|
||||||
memset(stream->data + original_size, 0, increased_size);
|
memset(stream->buffer + original_size, 0, increased_size);
|
||||||
stream_set_pos(stream, pos);
|
stream_set_pos(stream, pos);
|
||||||
}
|
}
|
||||||
|
@ -375,12 +375,12 @@ void tf_peer_dump_rfx(freerdp_peer* client)
|
|||||||
{
|
{
|
||||||
pcap_get_next_record_header(pcap_rfx, &record);
|
pcap_get_next_record_header(pcap_rfx, &record);
|
||||||
|
|
||||||
s->data = realloc(s->data, record.length);
|
s->buffer = realloc(s->buffer, record.length);
|
||||||
record.data = s->data;
|
record.data = s->buffer;
|
||||||
s->size = record.length;
|
s->capacity = record.length;
|
||||||
|
|
||||||
pcap_get_next_record_content(pcap_rfx, &record);
|
pcap_get_next_record_content(pcap_rfx, &record);
|
||||||
s->p = s->data + s->size;
|
s->pointer = s->buffer + s->capacity;
|
||||||
|
|
||||||
if (test_dump_rfx_realtime && test_sleep_tsdiff(&prev_seconds, &prev_useconds, record.header.ts_sec, record.header.ts_usec) == FALSE)
|
if (test_dump_rfx_realtime && test_sleep_tsdiff(&prev_seconds, &prev_useconds, record.header.ts_sec, record.header.ts_usec) == FALSE)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user