CVS: rdesktop seamless.c,1.1.2.5,1.1.2.6

Peter Åstrand <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2669

Modified Files:
      Tag: seamlessrdp-branch
	seamless.c 
Log Message:
Implemented seamless_send_state. 
seamless_send is now a varargs function.


Index: seamless.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/Attic/seamless.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** seamless.c	10 Mar 2006 13:34:41 -0000	1.1.2.5
--- seamless.c	10 Mar 2006 15:19:52 -0000	1.1.2.6
***************
*** 20,23 ****
--- 20,24 ----
  
  #include "rdesktop.h"
+ #include <stdarg.h>
  
  /* #define WITH_DEBUG_SEAMLESS */
***************
*** 246,257 ****
  
  static void
! seamless_send(const char *output)
  {
  	STREAM s;
  	size_t len;
  
- 	len = strlen(output);
  	s = channel_init(seamless_channel, len);
! 	out_uint8p(s, output, len) s_mark_end(s);
  
  #if 0
--- 247,263 ----
  
  static void
! seamless_send(const char *format, ...)
  {
  	STREAM s;
  	size_t len;
+ 	va_list argp;
+ 	char buf[1024];
+ 
+ 	va_start(argp, format);
+ 	len = vsnprintf(buf, sizeof(buf), format, argp);
+ 	va_end(argp);
  
  	s = channel_init(seamless_channel, len);
! 	out_uint8p(s, buf, len) s_mark_end(s);
  
  #if 0
***************
*** 269,270 ****
--- 275,285 ----
  	seamless_send("SYNC\n");
  }
+ 
+ 
+ void
+ seamless_send_state(unsigned long id, unsigned int state, unsigned long flags)
+ {
+ 
+ 	DEBUG_SEAMLESS(("sending STATE,0x%p,0x%x,0x%x\n", id, state, flags));
+ 	seamless_send("STATE,0x%p,0x%x,0x%x", id, state, flags);
+ }



-------------------------------------------------------
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.