CVS: rdesktop disk.c,1.30,1.31 rdesktop.c,1.112,1.113 rdpdr.c,1.34,1.35

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

Modified Files:
	disk.c rdesktop.c rdpdr.c 
Log Message:
Disk redirection actually uses share names; not drive letters. 
Make sure we truncate share names longer than 8 chars. 
Documentation updated.

Index: disk.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/disk.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** disk.c	9 Aug 2004 11:40:41 -0000	1.30
--- disk.c	9 Aug 2004 13:50:40 -0000	1.31
***************
*** 150,163 ****
  	{
  		pos2 = next_arg(optarg, '=');
- 		strcpy(g_rdpdr_device[*id].name, optarg);
- 
- 		toupper_str(g_rdpdr_device[*id].name);
  
! 		/* add trailing colon to name. */
! 		strcat(g_rdpdr_device[*id].name, ":");
  
  		g_rdpdr_device[*id].local_path = xmalloc(strlen(pos2) + 1);
  		strcpy(g_rdpdr_device[*id].local_path, pos2);
- 		printf("DISK %s to %s\n", g_rdpdr_device[*id].name, g_rdpdr_device[*id].local_path);
  		g_rdpdr_device[*id].device_type = DEVICE_TYPE_DISK;
  		count++;
--- 150,161 ----
  	{
  		pos2 = next_arg(optarg, '=');
  
! 		strncpy(g_rdpdr_device[*id].name, optarg, sizeof(g_rdpdr_device[*id].name));
! 		if (strlen(optarg) > 8)
! 			fprintf(stderr, "share name %s truncated to %s\n", optarg,
! 				g_rdpdr_device[*id].name);
  
  		g_rdpdr_device[*id].local_path = xmalloc(strlen(pos2) + 1);
  		strcpy(g_rdpdr_device[*id].local_path, pos2);
  		g_rdpdr_device[*id].device_type = DEVICE_TYPE_DISK;
  		count++;

Index: rdesktop.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdesktop.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** rdesktop.c	31 Jul 2004 13:07:41 -0000	1.112
--- rdesktop.c	9 Aug 2004 13:50:40 -0000	1.113
***************
*** 130,135 ****
  	fprintf(stderr, "             or      COM1=/dev/ttyS0,COM2=/dev/ttyS1\n");
  	fprintf(stderr,
! 		"         '-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");
--- 130,135 ----
  	fprintf(stderr, "             or      COM1=/dev/ttyS0,COM2=/dev/ttyS1\n");
  	fprintf(stderr,
! 		"         '-r disk:floppy=/mnt/floppy': enable redirection of /mnt/floppy to 'floppy' share\n");
! 	fprintf(stderr, "             or   'floppy=/mnt/floppy,cdrom=/mnt/cdrom'\n");
  	fprintf(stderr, "         '-r clientname=<client name>': Set the client name displayed\n");
  	fprintf(stderr, "             for redirected disks\n");

Index: rdpdr.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpdr.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** rdpdr.c	15 Jun 2004 22:17:08 -0000	1.34
--- rdpdr.c	9 Aug 2004 13:50:40 -0000	1.35
***************
*** 267,270 ****
--- 267,272 ----
  		out_uint32_le(s, g_rdpdr_device[i].device_type);
  		out_uint32_le(s, i);	/* RDP Device ID */
+ 		/* Is it possible to use share names longer than 8 chars?
+ 		   /astrand */
  		out_uint8p(s, g_rdpdr_device[i].name, 8);
  



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
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.