Various smalle tweaks in preparation for merging.

This commit is contained in:
Robin Sommer 2013-05-10 19:20:27 -07:00
parent ec50cad9db
commit 7610aa31b6
26 changed files with 236 additions and 129 deletions

View file

@ -1,3 +1,5 @@
// See the file "COPYING" in the main distribution directory for copyright.
#include <string>
#include "Extract.h"
@ -31,14 +33,16 @@ file_analysis::Analyzer* Extract::Instantiate(RecordVal* args, File* file)
const char* field = "extract_filename";
Val* v = args->Lookup(AnalyzerArgs->FieldOffset(field));
if ( ! v ) return 0;
if ( ! v )
return 0;
return new Extract(args, file, v->AsString()->CheckString());
}
bool Extract::DeliverChunk(const u_char* data, uint64 len, uint64 offset)
{
if ( ! fd ) return false;
if ( ! fd )
return false;
safe_pwrite(fd, data, len, offset);
return true;