SMB: Omit Negotiation adn Session logs if empty

Currently, we will output 'null' json fields for either of
these logs if they are not present; instead, let's just omit
them entirely.
This commit is contained in:
Jeff Cody 2019-05-23 13:54:45 -04:00
parent da90d489b1
commit 2e71f25c85
No known key found for this signature in database
GPG Key ID: BDBE7B27C0DE3057

@ -92,11 +92,11 @@ type SMBLog struct {
// NegotiationLog, if present, contains the server's response to the
// negotiation request.
NegotiationLog *NegotiationLog `json:"negotiation_log"`
NegotiationLog *NegotiationLog `json:"negotiation_log,omitempty"`
// SessionSetupLog, if present, contains the server's response to the
// session setup request.
SessionSetupLog *SessionSetupLog `json:"session_setup_log"`
SessionSetupLog *SessionSetupLog `json:"session_setup_log,omitempty"`
}
// LoggedSession wraps the Session struct, and holds a Log struct alongside it