From d65983f386e4a355c404e8b68a85ab301c37a59c Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Thu, 21 Mar 2013 01:43:03 -0700 Subject: [PATCH] No need for a Container.networkManager field: it can be accessed via Container.runtime --- container.go | 3 +-- runtime.go | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/container.go b/container.go index 04bb1bf0b0..2dcc3d0e28 100644 --- a/container.go +++ b/container.go @@ -32,7 +32,6 @@ type Container struct { Image string network *NetworkInterface - networkManager *NetworkManager NetworkSettings *NetworkSettings SysInitPath string @@ -266,7 +265,7 @@ func (container *Container) StderrPipe() (io.ReadCloser, error) { } func (container *Container) allocateNetwork() error { - iface, err := container.networkManager.Allocate() + iface, err := container.runtime.networkManager.Allocate() if err != nil { return err } diff --git a/runtime.go b/runtime.go index e362cdafe8..8d017df690 100644 --- a/runtime.go +++ b/runtime.go @@ -115,7 +115,6 @@ func (runtime *Runtime) Register(container *Container) error { return err } container.runtime = runtime - container.networkManager = runtime.networkManager // FIXME: infer from docker.runtime // Setup state lock (formerly in newState() lock := new(sync.Mutex) container.State.stateChangeLock = lock