~ps-jenkins/ubuntu-push/ubuntu-vivid-proposed

« back to all changes in this revision

Viewing changes to server/runner_devices.go

  • Committer: Roberto Alsina
  • Date: 2014-10-24 14:05:51 UTC
  • mfrom: (91.179.41 automatic)
  • mto: This revision was merged to the branch mainline in revision 136.
  • Revision ID: roberto.alsina@canonical.com-20141024140551-tsdz3xggo2rbwlqj
MergeĀ fromĀ automatic

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
// DevicesRunner returns a function to accept device connections.
63
63
// If adoptLst is not nil it will be used as the underlying listener, instead
64
64
// of creating one, wrapped in a TLS layer.
65
 
func DevicesRunner(adoptLst net.Listener, session func(net.Conn) error, logger logger.Logger, parsedCfg *DevicesParsedConfig) func() {
 
65
func DevicesRunner(adoptLst net.Listener, session func(net.Conn) error, logger logger.Logger, resource listener.SessionResourceManager, parsedCfg *DevicesParsedConfig) func() {
66
66
        BootLogger.Debugf("PingInterval: %s, ExchangeTimeout %s", parsedCfg.PingInterval(), parsedCfg.ExchangeTimeout())
67
67
        var rlim syscall.Rlimit
68
68
        err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim)
76
76
        }
77
77
        BootLogListener("devices", lst)
78
78
        return func() {
79
 
                err = lst.AcceptLoop(session, logger)
 
79
                err = lst.AcceptLoop(session, resource, logger)
80
80
                if err != nil {
81
81
                        BootLogFatalf("accepting device connections: %v", err)
82
82
                }