CVS: rdesktop rdpdr.c,1.23,1.24 rdesktop.c,1.100,1.101

Erik Forsberg <[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-serv11851

Modified Files:
	rdpdr.c rdesktop.c 
Log Message:
Made it possible to set the client name displayed to the right of the 
redirected disks (in Windows explorer) using -r:clientname=<client name>.


Index: rdpdr.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpdr.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** rdpdr.c	4 Mar 2004 08:24:40 -0000	1.23
--- rdpdr.c	2 Apr 2004 15:34:38 -0000	1.24
***************
*** 40,43 ****
--- 40,44 ----
  /* Table with information about rdpdr devices */
  RDPDR_DEVICE g_rdpdr_device[RDPDR_MAX_DEVICES];
+ char * g_rdpdr_clientname = NULL;
  
  /* Used to store incoming io request, until they are ready to be completed */
***************
*** 169,173 ****
  {
  	uint8 magic[4] = "rDNC";
! 	uint32 hostlen = (strlen(hostname) + 1) * 2;
  	STREAM s;
  
--- 170,177 ----
  {
  	uint8 magic[4] = "rDNC";
! 	if (NULL == g_rdpdr_clientname) {
! 	  g_rdpdr_clientname = hostname;
! 	}
! 	uint32 hostlen = (strlen(g_rdpdr_clientname) + 1) * 2;
  	STREAM s;
  
***************
*** 178,182 ****
  	out_uint32(s, 0);
  	out_uint32_le(s, hostlen);
! 	rdp_out_unistr(s, hostname, hostlen - 2);
  	s_mark_end(s);
  	channel_send(s, rdpdr_channel);
--- 182,186 ----
  	out_uint32(s, 0);
  	out_uint32_le(s, hostlen);
! 	rdp_out_unistr(s, g_rdpdr_clientname, hostlen - 2);
  	s_mark_end(s);
  	channel_send(s, rdpdr_channel);

Index: rdesktop.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdesktop.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -C2 -d -r1.100 -r1.101
*** rdesktop.c	15 Mar 2004 14:49:12 -0000	1.100
--- rdesktop.c	2 Apr 2004 15:34:38 -0000	1.101
***************
*** 80,83 ****
--- 80,84 ----
  extern RDPDR_DEVICE g_rdpdr_device[];
  extern uint32 g_num_devices;
+ extern char * g_rdpdr_clientname;
  
  #ifdef RDP2VNC
***************
*** 131,134 ****
--- 132,137 ----
  		"         '-r disk:A=/mnt/floppy': enable redirection of /mnt/floppy to A:\n");
  	fprintf(stderr, "             or   A=/mnt/floppy,D=/mnt/cdrom'\n");
+ 	fprintf(stderr, "         '-r clientname=<client name>': Set the client name displayed\n");
+ 	fprintf(stderr, "             for redirected disks\n");
  	fprintf(stderr,
  		"         '-r lptport:LPT1=/dev/lp0': enable parallel redirection of /dev/lp0 to LPT1\n");
***************
*** 494,497 ****
--- 497,505 ----
  					printer_enum_devices(&g_num_devices, optarg + 7);
  				}
+ 				else if (strncmp("clientname", optarg, 7) == 0)
+ 				{
+ 					g_rdpdr_clientname = xmalloc(strlen(optarg+11)+1);
+ 					strcpy(g_rdpdr_clientname, optarg + 11);
+ 				}
  				else
  				{



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
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.