Merge pull request #186 from celsius/master
add cmake option for redirection debug and fix a segmentation fault in redirection.c
This commit is contained in:
commit
194045b62a
@ -18,3 +18,4 @@ option(WITH_MANPAGES "Generate manpages." ON)
|
||||
option(WITH_PROFILER "Compile profiler." OFF)
|
||||
option(WITH_SSE2 "Use SSE2 optimization." OFF)
|
||||
option(WITH_SSE2_TARGET "Allow compiler to generate SSE2 instructions." OFF)
|
||||
option(WITH_DEBUG_REDIR "Redirection debug messages" OFF)
|
||||
|
@ -37,5 +37,6 @@
|
||||
#cmakedefine WITH_DEBUG_XV
|
||||
#cmakedefine WITH_DEBUG_SCARD
|
||||
#cmakedefine WITH_DEBUG_ORDERS
|
||||
#cmakedefine WITH_DEBUG_REDIR
|
||||
|
||||
#endif
|
||||
|
@ -138,12 +138,13 @@ boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
redirection->targetNetAddresses = (rdpString*) xzalloc(count * sizeof(rdpString));
|
||||
|
||||
while (count > 0)
|
||||
|
||||
int i;
|
||||
|
||||
for (i=0; i < count; i++)
|
||||
{
|
||||
freerdp_string_read_length32(s, redirection->targetNetAddresses, rdp->settings->uniconv);
|
||||
DEBUG_REDIR("targetNetAddresses: %s", redirection->targetNetAddresses->ascii);
|
||||
redirection->targetNetAddresses++;
|
||||
count--;
|
||||
freerdp_string_read_length32(s, &redirection->targetNetAddresses[i], rdp->settings->uniconv);
|
||||
DEBUG_REDIR("targetNetAddresses: %s", (&redirection->targetNetAddresses[i])->ascii);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user