This commit is contained in:
Simon Zolin
2020-05-20 12:13:40 +03:00
parent cdb00a5db7
commit 2a9b87c672
6 changed files with 291 additions and 208 deletions

View File

@@ -97,8 +97,8 @@ func (s *Server) CheckConfig(config ServerConfig) error {
// Create - create object
func Create(config ServerConfig) *Server {
s := Server{}
s.conf.Conf4.notify = s.onNotify
s.conf.Conf6.notify = s.onNotify
config.Conf4.notify = s.onNotify
config.Conf6.notify = s.onNotify
s.conf.DBFilePath = filepath.Join(config.WorkDir, dbFilename)
if !webHandlersRegistered && s.conf.HTTPRegister != nil {
@@ -135,11 +135,6 @@ func (s *Server) onNotify(flags uint32) {
s.notify(int(flags))
}
// Init checks the configuration and initializes the server
func (s *Server) Init(config ServerConfig) error {
return nil
}
// SetOnLeaseChanged - set callback
func (s *Server) SetOnLeaseChanged(onLeaseChanged onLeaseChangedT) {
s.onLeaseChanged = onLeaseChanged