CVS: rdesktop rdp.c, 1.102, 1.103 rdpdr.c, 1.53, 1.54 scard.c, 1.26, 1.27

Peter Åstrand <[email protected]> Thu, 24 Jan 2008 00:06:04 -0800
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27635

Modified Files:
	rdp.c rdpdr.c scard.c 
Log Message:
Indent fixes

Index: rdp.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdp.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -C2 -d -r1.102 -r1.103
*** rdp.c	5 Jan 2008 05:43:02 -0000	1.102
--- rdp.c	24 Jan 2008 08:06:02 -0000	1.103
***************
*** 247,251 ****
  {
  #ifdef HAVE_ICONV
! 	size_t ibl = in_len, obl = str_size-1;
  	char *pin = (char *) s->p, *pout = string;
  	static iconv_t iconv_h = (iconv_t) - 1;
--- 247,251 ----
  {
  #ifdef HAVE_ICONV
! 	size_t ibl = in_len, obl = str_size - 1;
  	char *pin = (char *) s->p, *pout = string;
  	static iconv_t iconv_h = (iconv_t) - 1;
***************
*** 292,303 ****
  	{
  		int i = 0;
! 		int len = in_len/2;
  		int rem = 0;
  
! 		if (len > str_size-1)
  		{
  			warning("server sent an unexpectedly long string, truncating\n");
! 			len = str_size-1;
! 			rem = in_len - 2*len;
  		}
  
--- 292,303 ----
  	{
  		int i = 0;
! 		int len = in_len / 2;
  		int rem = 0;
  
! 		if (len > str_size - 1)
  		{
  			warning("server sent an unexpectedly long string, truncating\n");
! 			len = str_size - 1;
! 			rem = in_len - 2 * len;
  		}
  
***************
*** 1351,1358 ****
  
  	/* read cookie string (plain ASCII) */
! 	if (len > sizeof(g_redirect_cookie)-1)
  	{
! 		uint32 rem = len - (sizeof(g_redirect_cookie)-1);
! 		len = sizeof(g_redirect_cookie)-1;
  
  		warning("Unexpectedly large redirection cookie\n");
--- 1351,1358 ----
  
  	/* read cookie string (plain ASCII) */
! 	if (len > sizeof(g_redirect_cookie) - 1)
  	{
! 		uint32 rem = len - (sizeof(g_redirect_cookie) - 1);
! 		len = sizeof(g_redirect_cookie) - 1;
  
  		warning("Unexpectedly large redirection cookie\n");

Index: rdpdr.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpdr.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** rdpdr.c	5 Jan 2008 05:43:02 -0000	1.53
--- rdpdr.c	24 Jan 2008 08:06:02 -0000	1.54
***************
*** 623,627 ****
  					if (length && length < 2 * 255)
  					{
! 						rdp_in_unistr(s, filename, sizeof(filename), length);
  						convert_to_unix_filename(filename);
  					}
--- 623,628 ----
  					if (length && length < 2 * 255)
  					{
! 						rdp_in_unistr(s, filename, sizeof(filename),
! 							      length);
  						convert_to_unix_filename(filename);
  					}

Index: scard.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/scard.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** scard.c	30 Oct 2007 13:09:37 -0000	1.26
--- scard.c	24 Jan 2008 08:06:02 -0000	1.27
***************
*** 1421,1427 ****
  	srcBytes = ((unsigned char *) src + sizeof(MYPCSC_SCARD_IO_REQUEST));
  	dstBytes = ((unsigned char *) dst + sizeof(SERVER_SCARD_IO_REQUEST));
! 	dst->dwProtocol = swap32((uint32_t)src->dwProtocol);
! 	dst->cbPciLength = swap32((uint32_t)src->cbPciLength
! 		- sizeof(MYPCSC_SCARD_IO_REQUEST) + sizeof(SERVER_SCARD_IO_REQUEST));
  	memcpy(dstBytes, srcBytes, bytesToCopy);
  }
--- 1421,1428 ----
  	srcBytes = ((unsigned char *) src + sizeof(MYPCSC_SCARD_IO_REQUEST));
  	dstBytes = ((unsigned char *) dst + sizeof(SERVER_SCARD_IO_REQUEST));
! 	dst->dwProtocol = swap32((uint32_t) src->dwProtocol);
! 	dst->cbPciLength = swap32((uint32_t) src->cbPciLength
! 				  - sizeof(MYPCSC_SCARD_IO_REQUEST) +
! 				  sizeof(SERVER_SCARD_IO_REQUEST));
  	memcpy(dstBytes, srcBytes, bytesToCopy);
  }
***************
*** 2481,2486 ****
  	{
  		while (listElement->data == NULL)
! 			pthread_cond_wait(&listElement->nodata,
! 			    &listElement->busy);
  
  		SC_deviceControl(listElement->data);
--- 2482,2486 ----
  	{
  		while (listElement->data == NULL)
! 			pthread_cond_wait(&listElement->nodata, &listElement->busy);
  
  		SC_deviceControl(listElement->data);
***************
*** 2499,2511 ****
  	PThreadListElement cur;
  
! 	for (cur = threadList; cur != NULL; cur = cur->next) {
! 		if (cur->data == NULL) {
  			pthread_mutex_lock(&cur->busy);
  			/* double check with lock held.... */
! 			if (cur->data != NULL) {
  				pthread_mutex_unlock(&cur->busy);
  				continue;
  			}
! 			
  			/* Wake up thread */
  			cur->data = data;
--- 2499,2514 ----
  	PThreadListElement cur;
  
! 	for (cur = threadList; cur != NULL; cur = cur->next)
! 	{
! 		if (cur->data == NULL)
! 		{
  			pthread_mutex_lock(&cur->busy);
  			/* double check with lock held.... */
! 			if (cur->data != NULL)
! 			{
  				pthread_mutex_unlock(&cur->busy);
  				continue;
  			}
! 
  			/* Wake up thread */
  			cur->data = data;


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/