Enlightenment CVS committal
Author : lordchaos
Project : e17
Module : apps/evfs
Dir : e17/apps/evfs/src/plugins
Modified Files:
evfs_fs_gzip.c
Log Message:
* Fixed an off-by-one error in the lexer. This is just a hack currently, to
detect when we go over the string boundary.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_gzip.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evfs_fs_gzip.c 20 Nov 2005 01:27:24 -0000 1.1
+++ evfs_fs_gzip.c 20 Nov 2005 23:23:36 -0000 1.2
@@ -58,6 +58,7 @@
#define GZIP_BUFFER 16384
+#define GZIP_MAX_ERRORS 5
Ecore_Hash* gzip_hash;
typedef struct gzip_file {
@@ -188,6 +189,7 @@
gzip_file* gfile = ecore_hash_get(gzip_hash, file);
int z_result;
int r_size;
+ int error=0;
//printf("Client requested %d bytes from gzip\n", size);
@@ -204,7 +206,10 @@
if (z_result == Z_STREAM_END) break;
if (z_result == Z_DATA_ERROR) {
printf("gzip datastream error..\n");
+ //inflateSync(&gfile->stream);
+ error++;
}
+ if (error > GZIP_MAX_ERRORS) return 0; /*Sim an EOF on error*/
}
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs