Pārlūkot izejas kodu

server: switched to gnuradionetwork system manager by default

master
Maurizio Porrato pirms 8 gadiem
vecāks
revīzija
7eff622e13
3 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  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 Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

@@ -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'],

Notiek ielāde…
Atcelt
Saglabāt