Duncan Webb wrote:
> 16:58:24,614 INFO     create thread notifier pipe
> 16:58:24,622 DEBUG    IOChannel read data: channel=<socket._socketobject
> object at 0xb68e4d14> fd=3 len=72
> 16:58:24,631 DEBUG    Got initial challenge from server, sending response.
> 16:58:24,645 DEBUG    IOChannel read data: channel=<socket._socketobject
> object at 0xb68e4d14> fd=3 len=72
> 16:58:24,647 DEBUG    Valid response received, remote authenticated.
> function='getfavoritesnow' args=[]

Looks good. I guess the bug is:

| self.status = CONNECTING
| yield kaa.inprogress(self)
| # Python 2.4 code
| self._connect_inprogress.get_result()
| self.status = CONNECTED

Now we have the problem that the record_client connects before this
code. Therefore the status is still CONNECTING. :(

Try the attached patch to kaa.base and let me know if it works.


Dischi

Index: src/rpc2.py
===================================================================
--- src/rpc2.py (revision 3827)
+++ src/rpc2.py (working copy)
@@ -672,10 +672,17 @@
             # Empty deferred write buffer now that we're authenticated.
             self._socket.write(''.join(self._write_buffer_deferred))
             self._write_buffer_deferred = []
-            self._connect_inprogress.finish(self)
-            self.signals['open'].emit()
+            self._handle_connected()
 
 
+    def _handle_connected(self):
+        """
+        Callback when the channel is authenticated and ready to be used
+        """
+        self._connect_inprogress.finish(self)
+        self.signals['open'].emit()
+
+
     def _get_rand_value(self):
         """
         Returns a 20 byte value which is computed as a SHA hash of the
@@ -759,6 +766,13 @@
             self._monitor(address, buffer_size, retry)
             self.monitoring = True
 
+    def _handle_connected(self):
+        """
+        Callback when the channel is authenticated and ready to be used
+        """
+        self.status = CONNECTED
+        super(Client, self)._handle_connected()
+
     def _handle_refused(self, type, value, tb):
         self._socket.signals['read'].disconnect(self._handle_read)
         self._socket.signals['closed'].disconnect(self._handle_close)
-- 
Communism is man's exploitation of man. Capitalism is just the opposite.
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to