mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath: Fix memory leak when processing a thread's input message fails. add comparator functor to the info maps of readerbackend and readerwriteend. Fix initialization of WriterFrontend names.
This commit is contained in:
commit
9e97f7c2aa
5 changed files with 17 additions and 6 deletions
13
src/util.h
13
src/util.h
|
@ -135,7 +135,7 @@ extern const char* fmt_access_time(double time);
|
|||
extern bool ensure_dir(const char *dirname);
|
||||
|
||||
// Returns true if path exists and is a directory.
|
||||
bool is_dir(const char* path);
|
||||
bool is_dir(const char* path);
|
||||
|
||||
extern uint8 shared_hmac_md5_key[16];
|
||||
|
||||
|
@ -346,4 +346,15 @@ inline int safe_vsnprintf(char* str, size_t size, const char* format, va_list al
|
|||
extern void get_memory_usage(unsigned int* total,
|
||||
unsigned int* malloced);
|
||||
|
||||
// Class to be used as a third argument for STL maps to be able to use
|
||||
// char*'s as keys. Otherwise the pointer values will be compared instead of
|
||||
// the actual string values.
|
||||
struct CompareString
|
||||
{
|
||||
bool operator()(char const *a, char const *b) const
|
||||
{
|
||||
return std::strcmp(a, b) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue