On Sunday 18 October 2009 01:08:03 Tim Brown wrote: > On Wednesday 07 October 2009 06:45:09 Felix Wolfsteller wrote: > > On Tuesday 06 October 2009 23:52:25 Tim Brown wrote: > Hmm, this is actually a lot more bothersome that I first thought....the > lifetime of the files seems to be quite long. After generating the filename > it writes to it and then does daft things like: > > files_add_translation (globals, origname, localname); > > Using mkstemp alone won't be enough although it did solve the time of check > time of write which inititially caught my eye :(. > > Seems we need to cache the filename we generate, the device ID and the inode > and check this on each subsequent read but it seems like a real nasty > solution. Either that or hold the contents in memory and bin the whole write > to disk element entirely. > > Suggestions?
I think, keeping them in memory is the best approach. Thus avoiding any disk IO. Isn't it an option to have the file contents in the KB? Perhaps define a maximum length for files and a maximum number of files that can be uploaded? Best Jan -- Dr. Jan-Oliver Wagner | ++49-541-335084-0 | http://www.greenbone.net/ Greenbone Networks GmbH, Neuer Graben 17, 49074 Osnabrück AG Osnabrück, HR B 202460 | Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner _______________________________________________ Openvas-devel mailing list Openvas-devel@wald.intevation.org http://lists.wald.intevation.org/mailman/listinfo/openvas-devel