Skip to content

Commit 0e50f4b

Browse files
mapuriroot
authored and
root
committed
Fix compilation issue.
1 parent 76e5cef commit 0e50f4b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

netd.go

+5-7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ limitations under the License.
1616
package main
1717

1818
import (
19+
"flag"
20+
"fmt"
1921
"github.com/coreos/go-etcd/etcd"
2022
"github.com/samalba/dockerclient"
2123
"log"
@@ -201,19 +203,15 @@ func handleContainerStart(netPlugin *plugin.NetPlugin, contId string) error {
201203
return nil
202204
}
203205

204-
func handleDockerEvents(event *dockerclient.Event, args ...interface{}) {
206+
func handleDockerEvents(event *dockerclient.Event, retErr chan error,
207+
args ...interface{}) {
205208
var err error
206209

207210
netPlugin, ok := args[0].(*plugin.NetPlugin)
208211
if !ok {
209212
log.Printf("error decoding netplugin in handleDocker \n")
210213
}
211214

212-
retErr, ok := args[1].(chan error)
213-
if !ok {
214-
log.Printf("error decoding netplugin in handleDocker \n")
215-
}
216-
217215
log.Printf("Received event: %#v, for netPlugin %v \n", *event, netPlugin)
218216

219217
// XXX: with plugin (in a lib) this code will handle these events
@@ -252,7 +250,7 @@ func run(netPlugin *plugin.NetPlugin) error {
252250
// start docker client and handle docker events
253251
// wait on error chan for problems handling the docker events
254252
dockerDriver := netPlugin.ContainerDriver.(*drivers.DockerDriver)
255-
dockerDriver.Client.StartMonitorEvents(handleDockerEvents, netPlugin, recvErr)
253+
dockerDriver.Client.StartMonitorEvents(handleDockerEvents, recvErr, netPlugin)
256254

257255
// XXX: todo, restore any config that might have been created till this
258256
// point

0 commit comments

Comments
 (0)