mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
UID, ..: un-inline methods to reduce header dependencies
Only 1% build time speedup, but still, it declutters the headers a bit. Before this patch: 2565.17user 141.83system 2:25.46elapsed 1860%CPU (0avgtext+0avgdata 1489076maxresident)k 72576inputs+9130920outputs (1667major+49400430minor)pagefaults 0swaps After this patch: 2537.19user 142.94system 2:26.90elapsed 1824%CPU (0avgtext+0avgdata 1434268maxresident)k 16240inputs+8887152outputs (1931major+48728888minor)pagefaults 0swaps
This commit is contained in:
parent
0db61f3094
commit
6a815b4b06
38 changed files with 348 additions and 211 deletions
|
@ -1,6 +1,8 @@
|
|||
#include "zeek-config.h"
|
||||
#include "Base64.h"
|
||||
#include "BroString.h"
|
||||
#include "Reporter.h"
|
||||
#include "Conn.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
@ -217,6 +219,14 @@ int Base64Converter::Done(int* pblen, char** pbuf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void Base64Converter::IllegalEncoding(const char* msg)
|
||||
{
|
||||
// strncpy(error_msg, msg, sizeof(error_msg));
|
||||
if ( conn )
|
||||
conn->Weird("base64_illegal_encoding", msg);
|
||||
else
|
||||
reporter->Error("%s", msg);
|
||||
}
|
||||
|
||||
BroString* decode_base64(const BroString* s, const BroString* a, Connection* conn)
|
||||
{
|
||||
|
@ -268,4 +278,3 @@ BroString* encode_base64(const BroString* s, const BroString* a, Connection* con
|
|||
|
||||
return new BroString(1, (u_char*)outbuf, outlen);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue