This commit is contained in:
Simon Zolin
2020-04-30 15:01:14 +03:00
parent 61e071d275
commit 738c7820fa
4 changed files with 66 additions and 4 deletions

View File

@@ -119,6 +119,7 @@ func (s *Server) CheckConfig(config ServerConfig) error {
func Create(config ServerConfig) *Server {
s := Server{}
s.conf = config
s.conf.Conf6.notify = s.notify6
s.conf.DBFilePath = filepath.Join(config.WorkDir, dbFilename)
if s.conf.Enabled {
err := s.setConfig(config)
@@ -146,6 +147,10 @@ func Create(config ServerConfig) *Server {
return &s
}
func (s *Server) notify6(flags uint32) {
s.dbStore()
}
// Init checks the configuration and initializes the server
func (s *Server) Init(config ServerConfig) error {
err := s.setConfig(config)