wingo - in flumotion/trunk: . flumotion/common flumotion/twisted

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Wed Jan 10 18:06:04 CET 2007


Author: wingo
Date: Wed Jan 10 18:06:02 2007
New Revision: 4381

Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/flumotion/common/server.py
   flumotion/trunk/flumotion/twisted/pb.py
Log:
2007-01-10  Andy Wingo  <wingo at pobox.com>

	* flumotion/twisted/pb.py (Avatar.disconnect): Return the result
	of loseConnection().

	* flumotion/common/server.py (Server.startTCP, Server.startSSL):
	Return the port we create.



Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Wed Jan 10 18:06:02 2007
@@ -1,3 +1,11 @@
+2007-01-10  Andy Wingo  <wingo at pobox.com>
+
+	* flumotion/twisted/pb.py (Avatar.disconnect): Return the result
+	of loseConnection().
+
+	* flumotion/common/server.py (Server.startTCP, Server.startSSL):
+	Return the port we create.
+
 2007-01-10  Zaheer Abbas Merali  <zaheerabbas at merali dot org>
 
 	* flumotion/component/misc/httpfile/admin_gtk.py:

Modified: flumotion/trunk/flumotion/common/server.py
==============================================================================
--- flumotion/trunk/flumotion/common/server.py	(original)
+++ flumotion/trunk/flumotion/common/server.py	Wed Jan 10 18:06:02 2007
@@ -86,6 +86,9 @@
         """
         Listen as the given host and on the given port using SSL.
         Use the given .pem file, or look for it in the config directory.
+
+        @returns: {twisted.internet.interfaces.IListeningPort} on which
+        we are listening; call .stopListening() to stop.
         """
         # if no path in pemFile, then look for it in the config directory
         if not os.path.split(pemFile)[0]:
@@ -102,15 +105,19 @@
         if not host == "":
             self.info('Listening as host %s' % host)
         self._servable.setConnectionInfo(host, port, True)
-        reactor.listenSSL(port, self._servable.getFactory(), ctxFactory,
-            interface=host)
+        return reactor.listenSSL(port, self._servable.getFactory(),
+                                 ctxFactory, interface=host)
 
     def startTCP(self, host, port):
         """
         Listen as the given host and on the given port using normal TCP.
+
+        @returns: {twisted.internet.interfaces.IListeningPort} on which
+        we are listening; call .stopListening() to stop.
         """
         self.info('Starting on port %d using TCP' % port)
         if not host == "":
             self.info('Listening as host %s' % host)
         self._servable.setConnectionInfo(host, port, False)
-        reactor.listenTCP(port, self._servable.getFactory(), interface=host)
+        return reactor.listenTCP(port, self._servable.getFactory(),
+                                 interface=host)

Modified: flumotion/trunk/flumotion/twisted/pb.py
==============================================================================
--- flumotion/trunk/flumotion/twisted/pb.py	(original)
+++ flumotion/trunk/flumotion/twisted/pb.py	Wed Jan 10 18:06:02 2007
@@ -723,7 +723,7 @@
         do nothing.
         """
         if self.mind:
-            self.mind.broker.transport.loseConnection()
+            return self.mind.broker.transport.loseConnection()
 
 class PingableAvatar(Avatar):
     _pingCheckInterval = configure.heartbeatInterval * 2.5


More information about the flumotion-commit mailing list