gameServer/OfficialServer/DBInteraction.hs
changeset 4975 31da8979e5b1
parent 4944 e43a3da2fc22
child 4982 3572eaf14340
--- a/gameServer/OfficialServer/DBInteraction.hs	Mon Feb 28 22:28:43 2011 +0300
+++ b/gameServer/OfficialServer/DBInteraction.hs	Thu Mar 03 22:15:13 2011 +0300
@@ -27,7 +27,7 @@
 localAddressList :: [B.ByteString]
 localAddressList = ["127.0.0.1", "0:0:0:0:0:0:0:1", "0:0:0:0:0:ffff:7f00:1"]
 
-fakeDbConnection :: forall b. ServerInfo -> IO b
+--fakeDbConnection :: forall b. (ServerInfo c)-> IO b
 fakeDbConnection si = forever $ do
     q <- readChan $ dbQueries si
     case q of
@@ -36,9 +36,9 @@
         ClearCache -> return ()
         SendStats {} -> return ()
 
-dbConnectionLoop :: forall b. ServerInfo -> IO b
+--dbConnectionLoop :: forall b. (ServerInfo c) -> IO b
 #if defined(OFFICIAL_SERVER)
-flushRequests :: ServerInfo -> IO ()
+flushRequests :: (ServerInfo c) -> IO ()
 flushRequests si = do
     e <- isEmptyChan $ dbQueries si
     unless e $ do
@@ -89,7 +89,7 @@
         maybeException (Just a) = return a
         maybeException Nothing = ioError (userError "Can't read")
 
-pipeDbConnection :: forall b. Map.Map ByteString (UTCTime, AccountInfo) -> ServerInfo -> Int -> IO b
+--pipeDbConnection :: forall b. Map.Map ByteString (UTCTime, AccountInfo) -> (ServerInfo c) -> Int -> IO b
 pipeDbConnection accountsCache si errNum = do
     (updatedCache, newErrNum) <-
         Exception.handle (\(e :: Exception.IOException) -> warningM "Database" (show e) >> return (accountsCache, errNum + 1)) $ do
@@ -118,6 +118,6 @@
 dbConnectionLoop = fakeDbConnection
 #endif
 
-startDBConnection :: ServerInfo -> IO ()
+startDBConnection :: (ServerInfo c) -> IO ()
 startDBConnection serverInfo =
     forkIO (dbConnectionLoop serverInfo) >> return ()