[Clam-devel] SMSBatch bug: too much opened files.
Hernán Ordiales
h at ordia.com.ar
Thu Mar 29 11:31:35 PDT 2007
i've opened this patch just for fun and to start getting involved with
this list and i've noticed that if the file descriptor "mFile" is
different from '-1' you're double checking it with if without sense...
what an optimization! :-)
i mean:
Index: CLAM/src/Tools/SDIF/SDIFFile.cxx
===================================================================
--- CLAM/src/Tools/SDIF/SDIFFile.cxx (revisión: 9886)
+++ CLAM/src/Tools/SDIF/SDIFFile.cxx (copia de trabajo)
@@ -68,11 +68,12 @@
if (mFile==-1) // if open file error
{
//Open the file only if unopened
mFile = open(mpName,mode,0644);
+
+ if (mFile==-1) // if open file error
+ {
+ throw CLAM::ErrOpenFile(mpName); // throw filename
+ }
}
- if (mFile==-1) // if open file error
- {
- throw CLAM::ErrOpenFile(mpName); // throw filename
- }
mSize = lseek(mFile,0,SEEK_END);
lseek(mFile,0,SEEK_SET);
}
just that
cheers,
--
Hernán
http://h.ordia.com.ar
GnuPG: 0xEE8A3FE9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toomuchopenedfilessmallfix.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20070329/1747e2f4/attachment-0005.bin>
More information about the clam-devel
mailing list