Convert exec session tracking to use a dedicated struct

This will behave better if we need to add anything to it at a
later date - we can add fields to the struct without breaking
existing BoltDB databases.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: baude
This commit is contained in:
Matthew Heon
2018-02-27 22:52:28 -05:00
committed by Atomic Bot
parent 83d7ae6506
commit fa5f99effa
8 changed files with 440 additions and 49 deletions

@ -338,7 +338,7 @@ func (s *SQLState) UpdateContainer(ctr *Container) error {
newState.IPAddress = ipAddress
newState.SubnetMask = subnetMask
newState.ExecSessions = make(map[string]int)
newState.ExecSessions = make(map[string]*ExecSession)
if err := json.Unmarshal([]byte(execSessions), &newState.ExecSessions); err != nil {
return errors.Wrapf(err, "error parsing container %s exec sessions", ctr.ID())
}