Ocean/ICCC/Init.go
Thorsten Sommer 7120a729bd Bug fixing
+ DB access is now right and uses copied sessions
+ DB session is now specifying the safe state and the mode
+ Fixed the issue with too early ICCC messages regarding to late cache
+ Add the MIME type for Dart
+ Fixed the issuse with wrong order of shutdown handlers
- TODO: Testing of these changes
2014-06-04 21:41:18 +02:00

27 lines
954 B
Go

package ICCC
import "strings"
import "container/list"
import "github.com/SommerEngineering/Ocean/Tools"
import "github.com/SommerEngineering/Ocean/ConfigurationDB"
import "github.com/SommerEngineering/Ocean/Log"
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
func init() {
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Start init of ICCC.`)
defer Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Done init ICCC.`)
cacheListenerDatabase = list.New()
listeners = make(map[string]func(data map[string][]string))
allHostsIPAddresses := Tools.ReadAllIPAddresses4ThisHost()
oceanHostnameAndPort := ConfigurationDB.Read(`OceanHostnameAndPort`)
port := oceanHostnameAndPort[strings.Index(oceanHostnameAndPort, `:`):]
correctAddressWithPort = allHostsIPAddresses[0] + port
initDB()
registerHost2Database()
cacheTimerLogic(false)
initCacheTimer()
}