瀏覽代碼

server: switched to gnuradionetwork system manager by default

master
Maurizio Porrato 8 年之前
父節點
當前提交
7eff622e13
共有 3 個檔案被更改,包括 7 行新增5 行删除
  1. +2
    -2
      frn/protocol/server.py
  2. +3
    -2
      manager.py
  3. +2
    -1
      twisted/plugins/frnserver.py

+ 2
- 2
frn/protocol/server.py 查看文件

@@ -112,10 +112,10 @@ class FRNServer(BufferingLineReceiver, TimeoutMixin):
self.stopPinging()
if self.user is not None:
log.msg("Logging out client %s" % self.user)
if self.factory.talking.get(self.user.NT) == self:
del self.factory.talking[self.user.NT]
self.factory.manager.clientLogout(self.factory.serverAuth, self.user)
self.factory.tracker.logout(self)
if self.factory.talking.get(self.user.NT) == self:
del self.factory.talking[self.user.NT]
self.transport.loseConnection()

def decodeCT(self, body):

+ 3
- 2
manager.py 查看文件

@@ -26,10 +26,11 @@ if __name__ == '__main__':
log.msg("Building RemoteManager")
return RemoteManager(reactor)

pool = ConnectionPool("sqlite3", "/dev/shm/frnmanager.sqlite3", check_same_thread=False, cp_noisy=True)

def databaseManagerFactory():
log.msg("Building DatabaseManager")
return DatabaseManager(
ConnectionPool("sqlite3", "/tmp/frnmanager.sqlite3", check_same_thread=False, cp_noisy=True))
return DatabaseManager(pool)

reactor.listenTCP(10025, FRNManagerServerFactory(
databaseManagerFactory

+ 2
- 1
twisted/plugins/frnserver.py 查看文件

@@ -52,7 +52,8 @@ class FRNServerServiceMaker(object):
return internet.TCPServer(options['port'],
FRNServerFactory(
pjoin(options['confdir'], 'tracker.shelve'),
RemoteManager(),
# RemoteManager(), # Authenticate on frn.no-ip.info
RemoteManager(server='fri.no-ip.info', maskParrot=False),
FRNUser(
SN=options['server'],PT=options['port'],
BN=options['backup_server'], BP=options['backup_port'],

Loading…
取消
儲存