CVS: rdesktop pstcache.c,1.2,1.3

Jeroen Meijer <[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-serv7326

Modified Files:
	pstcache.c 
Log Message:
fix huge persistent cache files bug

Index: pstcache.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/pstcache.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pstcache.c	12 Jul 2004 21:07:39 -0000	1.2
--- pstcache.c	25 Dec 2004 13:37:08 -0000	1.3
***************
*** 23,27 ****
  #define MAX_CELL_SIZE		0x1000	/* pixels */
  
! #define IS_PERSISTENT(id) (g_pstcache_fd[id] > 0)
  
  extern int g_server_bpp;
--- 23,27 ----
  #define MAX_CELL_SIZE		0x1000	/* pixels */
  
! #define IS_PERSISTENT(id) (id < 8 && g_pstcache_fd[id] > 0)
  
  extern int g_server_bpp;
***************
*** 43,47 ****
  	int fd;
  
! 	if (!IS_PERSISTENT(cache_id))
  		return;
  
--- 43,47 ----
  	int fd;
  
! 	if (!IS_PERSISTENT(cache_id) || cache_idx >= BMPCACHE2_NUM_PSTCELLS)
  		return;
  
***************
*** 60,64 ****
  	HBITMAP bitmap;
  
! 	if (!(g_bitmap_cache_persist_enable && IS_PERSISTENT(cache_id)))
  		return False;
  
--- 60,67 ----
  	HBITMAP bitmap;
  
! 	if (!g_bitmap_cache_persist_enable)
! 		return False;
! 
! 	if (!IS_PERSISTENT(cache_id) || cache_idx >= BMPCACHE2_NUM_PSTCELLS)
  		return False;
  
***************
*** 86,90 ****
  	CELLHEADER cellhdr;
  
! 	if (!IS_PERSISTENT(cache_id))
  		return False;
  
--- 89,93 ----
  	CELLHEADER cellhdr;
  
! 	if (!IS_PERSISTENT(cache_id) || cache_idx >= BMPCACHE2_NUM_PSTCELLS)
  		return False;
  



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.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.