Browse Source

server: switched to gnuradionetwork system manager by default

Maurizio Porrato 7 years ago
parent
commit
7eff622e13
3 changed files with 7 additions and 5 deletions
  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 View File

@@ -112,10 +112,10 @@ class FRNServer(BufferingLineReceiver, TimeoutMixin):
112 112
         self.stopPinging()
113 113
         if self.user is not None:
114 114
             log.msg("Logging out client %s" % self.user)
115
+            if self.factory.talking.get(self.user.NT) == self:
116
+                del self.factory.talking[self.user.NT]
115 117
             self.factory.manager.clientLogout(self.factory.serverAuth, self.user)
116 118
             self.factory.tracker.logout(self)
117
-        if self.factory.talking.get(self.user.NT) == self:
118
-            del self.factory.talking[self.user.NT]
119 119
         self.transport.loseConnection()
120 120
 
121 121
     def decodeCT(self, body):

+ 3
- 2
manager.py View File

@@ -26,10 +26,11 @@ if __name__ == '__main__':
26 26
 		log.msg("Building RemoteManager")
27 27
 		return RemoteManager(reactor)
28 28
 
29
+    pool = ConnectionPool("sqlite3", "/dev/shm/frnmanager.sqlite3", check_same_thread=False, cp_noisy=True)
30
+
29 31
 	def databaseManagerFactory():
30 32
 		log.msg("Building DatabaseManager")
31
-		return DatabaseManager(
32
-			ConnectionPool("sqlite3", "/tmp/frnmanager.sqlite3", check_same_thread=False, cp_noisy=True))
33
+		return DatabaseManager(pool)
33 34
 
34 35
 	reactor.listenTCP(10025, FRNManagerServerFactory(
35 36
 		databaseManagerFactory

+ 2
- 1
twisted/plugins/frnserver.py View File

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

Loading…
Cancel
Save