libfreerdp-core: do not ignore X.224 Connection Confirm in TSG

This commit is contained in:
Marc-André Moreau 2012-11-14 09:01:33 -05:00
parent 1284c3accc
commit 8f111bcc4a
2 changed files with 9 additions and 29 deletions

View File

@ -120,18 +120,18 @@ struct _MSUSB_CONFIG_DESCRIPTOR
} __attribute__((packed)); } __attribute__((packed));
/* MSUSB_PIPE exported functions */ /* MSUSB_PIPE exported functions */
void msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, MSUSB_PIPE_DESCRIPTOR** NewMsPipes, UINT32 NewNumberOfPipes); FREERDP_API void msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, MSUSB_PIPE_DESCRIPTOR** NewMsPipes, UINT32 NewNumberOfPipes);
/* MSUSB_INTERFACE exported functions */ /* MSUSB_INTERFACE exported functions */
void msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR* MsConfig, BYTE InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR* NewMsInterface); FREERDP_API void msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR* MsConfig, BYTE InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR* NewMsInterface);
MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_read(BYTE* data, UINT32 data_size, int* offset); FREERDP_API MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_read(BYTE* data, UINT32 data_size, int* offset);
int msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, BYTE* data, int* offset); FREERDP_API int msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, BYTE* data, int* offset);
/* MSUSB_CONFIG exported functions */ /* MSUSB_CONFIG exported functions */
MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_new(); FREERDP_API MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_new();
void msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR* MsConfig); FREERDP_API void msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR* MsConfig);
MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(BYTE* data, UINT32 data_size, UINT32 NumInterfaces); FREERDP_API MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(BYTE* data, UINT32 data_size, UINT32 NumInterfaces);
int msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, BYTE* data, int * offset); FREERDP_API int msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, BYTE* data, int * offset);
void msusb_msconfig_dump(MSUSB_CONFIG_DESCRIPTOR* MsConfg); FREERDP_API void msusb_msconfig_dump(MSUSB_CONFIG_DESCRIPTOR* MsConfg);
#endif #endif

View File

@ -1077,20 +1077,6 @@ BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port)
return TRUE; return TRUE;
} }
BYTE unknown_pdu1[] =
"\x16\x03\x03\x00\xb4\x01\x00\x00\xb0\x03\x03\x50\x8b\x3e\xaf\xcc"
"\xa6\xb6\x7d\xd1\x88\x35\xca\x64\x82\xb3\x2b\x45\xd7\xf8\x57\xd6"
"\xfc\x23\xd2\xb0\x5b\x0d\xd4\x6c\xae\x76\xee\x00\x00\x2a\x00\x3c"
"\x00\x2f\x00\x3d\x00\x35\x00\x05\x00\x0a\xc0\x27\xc0\x13\xc0\x14"
"\xc0\x2b\xc0\x23\xc0\x2c\xc0\x24\xc0\x09\xc0\x0a\x00\x40\x00\x32"
"\x00\x6a\x00\x38\x00\x13\x00\x04\x01\x00\x00\x5d\xff\x01\x00\x01"
"\x00\x00\x00\x00\x23\x00\x21\x00\x00\x1e\x4c\x41\x42\x31\x2d\x57"
"\x37\x2d\x44\x4d\x2d\x30\x31\x2e\x6c\x61\x62\x31\x2e\x61\x77\x61"
"\x6b\x65\x2e\x6c\x6f\x63\x61\x6c\x00\x05\x00\x05\x01\x00\x00\x00"
"\x00\x00\x0a\x00\x06\x00\x04\x00\x17\x00\x18\x00\x0b\x00\x02\x01"
"\x00\x00\x0d\x00\x10\x00\x0e\x04\x01\x05\x01\x02\x01\x04\x03\x05"
"\x03\x02\x03\x02\x02\x00\x23\x00\x00";
int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length) int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length)
{ {
int status; int status;
@ -1126,12 +1112,6 @@ int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length)
printf("Ignoring 64-byte length PDU (probably TsProxySetupReceivePipe return code)\n"); printf("Ignoring 64-byte length PDU (probably TsProxySetupReceivePipe return code)\n");
return tsg_read(tsg, data, length); return tsg_read(tsg, data, length);
} }
if (header->frag_length == 80)
{
printf("Ignoring 80-byte length PDU (probably TsProxySetupReceivePipe return code)\n");
//tsg_write(tsg, unknown_pdu1, sizeof(unknown_pdu1));
return tsg_read(tsg, data, length);
}
tsg->pendingPdu = TRUE; tsg->pendingPdu = TRUE;
tsg->bytesAvailable = header->frag_length; tsg->bytesAvailable = header->frag_length;