Пример #1
0
int nla_recv(rdpNla* nla)
{
	wStream* s;
	int status;

	s = Stream_New(NULL, 4096);

	if (!s)
	{
		WLog_ERR(TAG, "Stream_New failed!");
		return -1;
	}

	status = transport_read_pdu(nla->transport, s);

	if (status < 0)
	{
		WLog_ERR(TAG, "nla_recv() error: %d", status);
		Stream_Free(s, TRUE);
		return -1;
	}

	if (nla_decode_ts_request(nla, s) < 1)
	{
		Stream_Free(s, TRUE);
		return -1;
	}

	Stream_Free(s, TRUE);
	return 1;
}
Пример #2
0
int nla_recv_pdu(rdpNla* nla, wStream* s)
{
	if (nla_decode_ts_request(nla, s) < 1)
		return -1;

	if (nla_client_recv(nla) < 1)
		return -1;

	return 1;
}
Пример #3
0
int nla_recv_pdu(rdpNla* nla, wStream* s)
{
	if (nla_decode_ts_request(nla, s) < 1)
		return -1;

	if (nla->errorCode)
	{
		WLog_ERR(TAG, "SPNEGO failed with NTSTATUS: %08X", nla->errorCode);
		freerdp_set_last_error(nla->instance->context, nla->errorCode);
		return -1;
	}

	if (nla_client_recv(nla) < 1)
		return -1;

	return 1;
}