CVS: rdesktop disk.c,1.51,1.52 rdpdr.c,1.42,1.43 types.h,1.26,1.27

Michael Gernoth <[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-serv4933

Modified Files:
	disk.c rdpdr.c types.h 
Log Message:
Slightly modified long filenames-patch from Alex Miller <asm at asm.kiev.ua>


Index: disk.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/disk.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** disk.c	2 Aug 2005 09:28:54 -0000	1.51
--- disk.c	15 Aug 2005 11:44:35 -0000	1.52
***************
*** 145,152 ****
  typedef struct
  {
! 	char name[256];
! 	char label[256];
  	unsigned long serial;
! 	char type[256];
  } FsInfoType;
  
--- 145,152 ----
  typedef struct
  {
! 	char name[PATH_MAX];
! 	char label[PATH_MAX];
  	unsigned long serial;
! 	char type[PATH_MAX];
  } FsInfoType;
  
***************
*** 345,349 ****
  	DIR *dirp;
  	int flags, mode;
! 	char path[256];
  	struct stat filestat;
  
--- 345,349 ----
  	DIR *dirp;
  	int flags, mode;
! 	char path[PATH_MAX];
  	struct stat filestat;
  
***************
*** 492,496 ****
  	g_fileinfo[handle].flags_and_attributes = flags_and_attributes;
  	g_fileinfo[handle].accessmask = accessmask;
! 	strncpy(g_fileinfo[handle].path, path, 255);
  	g_fileinfo[handle].delete_on_close = False;
  	g_notify_stamp = True;
--- 492,496 ----
  	g_fileinfo[handle].flags_and_attributes = flags_and_attributes;
  	g_fileinfo[handle].accessmask = accessmask;
! 	strncpy(g_fileinfo[handle].path, path, PATH_MAX-1);
  	g_fileinfo[handle].delete_on_close = False;
  	g_notify_stamp = True;
***************
*** 699,703 ****
  {
  	uint32 length, file_attributes, ft_high, ft_low, delete_on_close;
! 	char newname[256], fullpath[256];
  	struct fileinfo *pfinfo;
  	int mode;
--- 699,703 ----
  {
  	uint32 length, file_attributes, ft_high, ft_low, delete_on_close;
! 	char newname[PATH_MAX], fullpath[PATH_MAX];
  	struct fileinfo *pfinfo;
  	int mode;
***************
*** 1113,1117 ****
  {
  	uint32 file_attributes, ft_low, ft_high;
! 	char *dirname, fullpath[256];
  	DIR *pdir;
  	struct dirent *pdirent;
--- 1113,1117 ----
  {
  	uint32 file_attributes, ft_low, ft_high;
! 	char *dirname, fullpath[PATH_MAX];
  	DIR *pdir;
  	struct dirent *pdirent;
***************
*** 1131,1135 ****
  			if (pattern[0] != 0)
  			{
! 				strncpy(pfinfo->pattern, 1 + strrchr(pattern, '/'), 64);
  				rewinddir(pdir);
  			}
--- 1131,1135 ----
  			if (pattern[0] != 0)
  			{
! 				strncpy(pfinfo->pattern, 1 + strrchr(pattern, '/'), PATH_MAX-1);
  				rewinddir(pdir);
  			}

Index: rdpdr.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpdr.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** rdpdr.c	2 Aug 2005 09:45:11 -0000	1.42
--- rdpdr.c	15 Aug 2005 11:44:35 -0000	1.43
***************
*** 353,357 ****
  		share_mode, disposition, total_timeout, interval_timeout, flags_and_attributes = 0;
  
! 	char filename[256];
  	uint8 *buffer, *pst_buf;
  	struct stream out;
--- 353,357 ----
  		share_mode, disposition, total_timeout, interval_timeout, flags_and_attributes = 0;
  
! 	char filename[PATH_MAX];
  	uint8 *buffer, *pst_buf;
  	struct stream out;

Index: types.h
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/types.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** types.h	2 Aug 2005 15:07:34 -0000	1.26
--- types.h	15 Aug 2005 11:44:35 -0000	1.27
***************
*** 249,259 ****
  NOTIFY;
  
  typedef struct fileinfo
  {
  	uint32 device_id, flags_and_attributes, accessmask;
! 	char path[256];
  	DIR *pdir;
  	struct dirent *pdirent;
! 	char pattern[64];
  	BOOL delete_on_close;
  	NOTIFY notify;
--- 249,263 ----
  NOTIFY;
  
+ #ifndef PATH_MAX
+ #define PATH_MAX 256
+ #endif
+ 
  typedef struct fileinfo
  {
  	uint32 device_id, flags_and_attributes, accessmask;
! 	char path[PATH_MAX];
  	DIR *pdir;
  	struct dirent *pdirent;
! 	char pattern[PATH_MAX];
  	BOOL delete_on_close;
  	NOTIFY notify;



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
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.