CVS: seamlessrdp/ServerExe main.c,1.5,1.6 vchannel.c,1.3,1.4

Pierre Ossman <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/seamlessrdp/ServerExe
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24143

Modified Files:
	main.c vchannel.c 
Log Message:
indentation fix.


Index: main.c
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** main.c	9 Mar 2006 15:26:35 -0000	1.5
--- main.c	9 Mar 2006 15:27:39 -0000	1.6
***************
*** 68,72 ****
  }
  
! static BOOL CALLBACK enum_cb(HWND hwnd, LPARAM lparam)
  {
  	RECT rect;
--- 68,73 ----
  }
  
! static BOOL CALLBACK
! enum_cb(HWND hwnd, LPARAM lparam)
  {
  	RECT rect;
***************
*** 82,86 ****
  	vchannel_write("CREATE1,0x%p,0x%x", hwnd, 0);
  
! 	if (!GetWindowRect(hwnd, &rect)) {
  		debug("GetWindowRect failed!");
  		return TRUE;
--- 83,88 ----
  	vchannel_write("CREATE1,0x%p,0x%x", hwnd, 0);
  
! 	if (!GetWindowRect(hwnd, &rect))
! 	{
  		debug("GetWindowRect failed!");
  		return TRUE;
***************
*** 89,96 ****
  	vchannel_write("POSITION1,0x%p,%d,%d,%d,%d,0x%x",
  		       hwnd,
! 		       rect.left, rect.top,
! 		       rect.right - rect.left,
! 		       rect.bottom - rect.top,
! 		       0);
  
  	GetWindowText(hwnd, title, sizeof(title));
--- 91,95 ----
  	vchannel_write("POSITION1,0x%p,%d,%d,%d,%d,0x%x",
  		       hwnd,
! 		       rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 0);
  
  	GetWindowText(hwnd, title, sizeof(title));
***************
*** 105,110 ****
  		state = 0;
  
! 	vchannel_write("SETSTATE1,0x%p,%s,0x%x,0x%x",
! 		       hwnd, title, state, 0);
  
  	return TRUE;
--- 104,108 ----
  		state = 0;
  
! 	vchannel_write("SETSTATE1,0x%p,%s,0x%x,0x%x", hwnd, title, state, 0);
  
  	return TRUE;
***************
*** 133,137 ****
  	char *p, *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8;
  
! 	while ((size = vchannel_read(line, sizeof(line))) >= 0) {
  		debug("Got: %s", line);
  
--- 131,136 ----
  	char *p, *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8;
  
! 	while ((size = vchannel_read(line, sizeof(line))) >= 0)
! 	{
  		debug("Got: %s", line);
  

Index: vchannel.c
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/vchannel.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** vchannel.c	9 Mar 2006 15:14:50 -0000	1.3
--- vchannel.c	9 Mar 2006 15:27:39 -0000	1.4
***************
*** 62,66 ****
  
  	g_mutex = CreateMutex(NULL, FALSE, "Local\\SeamlessChannel");
! 	if (!g_mutex) {
  		WTSVirtualChannelClose(g_vchannel);
  		g_vchannel = NULL;
--- 62,67 ----
  
  	g_mutex = CreateMutex(NULL, FALSE, "Local\\SeamlessChannel");
! 	if (!g_mutex)
! 	{
  		WTSVirtualChannelClose(g_vchannel);
  		g_vchannel = NULL;
***************
*** 109,120 ****
  				       sizeof(buffer) - size, &bytes_read);
  
! 	if (!result) {
  		errno = EIO;
  		return -1;
  	}
  
! 	if (overflow_mode) {
  		newline = strchr(buffer, '\n');
! 		if (newline && (newline - buffer) < bytes_read) {
  			size = bytes_read - (newline - buffer) - 1;
  			memmove(buffer, newline + 1, size);
--- 110,124 ----
  				       sizeof(buffer) - size, &bytes_read);
  
! 	if (!result)
! 	{
  		errno = EIO;
  		return -1;
  	}
  
! 	if (overflow_mode)
! 	{
  		newline = strchr(buffer, '\n');
! 		if (newline && (newline - buffer) < bytes_read)
! 		{
  			size = bytes_read - (newline - buffer) - 1;
  			memmove(buffer, newline + 1, size);
***************
*** 125,129 ****
  		size += bytes_read;
  
! 	if (overflow_mode) {
  		errno = -EAGAIN;
  		return -1;
--- 129,134 ----
  		size += bytes_read;
  
! 	if (overflow_mode)
! 	{
  		errno = -EAGAIN;
  		return -1;
***************
*** 131,136 ****
  
  	newline = strchr(buffer, '\n');
! 	if (!newline || (newline - buffer) >= size) {
! 		if (size == sizeof(buffer)) {
  			overflow_mode = TRUE;
  			size = 0;
--- 136,143 ----
  
  	newline = strchr(buffer, '\n');
! 	if (!newline || (newline - buffer) >= size)
! 	{
! 		if (size == sizeof(buffer))
! 		{
  			overflow_mode = TRUE;
  			size = 0;
***************
*** 140,144 ****
  	}
  
! 	if ((newline - buffer) >= length) {
  		errno = ENOMEM;
  		return -1;
--- 147,152 ----
  	}
  
! 	if ((newline - buffer) >= length)
! 	{
  		errno = ENOMEM;
  		return -1;



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.