summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-01-05 19:23:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-12 11:43:50 +0000
commit749ca687091d6ee7f92fce4c385a7ff4bd2636aa (patch)
tree8048dfcd1dc0db115be4d990a13f18e241402c03 /bitbake
parentf5a1f1d7f0b51d0936edd74def07f07a2342ad17 (diff)
downloadopenembedded-core-749ca687091d6ee7f92fce4c385a7ff4bd2636aa.tar.gz
openembedded-core-749ca687091d6ee7f92fce4c385a7ff4bd2636aa.tar.bz2
openembedded-core-749ca687091d6ee7f92fce4c385a7ff4bd2636aa.zip
bitbake/uievent: fix queueing of events for xmlrpc before UI has loaded
The recent change to Queue up events before the UI is spawned (in 26eda933379801ef1c8b4b09e67d14f498cd3813) broke the xmlrpc server because the uievent implementation of BBUIEventQueue expects pickled strings for its queue_event() method. This is because the RPC exposed event.send() method must accept pickled strings, but for xmlrpc event.send() is just mapped to queue_event(). Work around this by adding a send_event method which unpickles strings and hands them off to queue_event() which can then be used for the remapping. Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/uievent.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/uievent.py b/bitbake/lib/bb/ui/uievent.py
index b404805d81..2fef4e4659 100644
--- a/bitbake/lib/bb/ui/uievent.py
+++ b/bitbake/lib/bb/ui/uievent.py
@@ -63,17 +63,20 @@ class BBUIEventQueue:
def queue_event(self, event):
self.eventQueueLock.acquire()
- self.eventQueue.append(pickle.loads(event))
+ self.eventQueue.append(event)
self.eventQueueNotify.set()
self.eventQueueLock.release()
+ def send_event(self, event):
+ self.queue_event(pickle.loads(event))
+
def startCallbackHandler(self):
server = UIXMLRPCServer()
self.host, self.port = server.socket.getsockname()
server.register_function( self.system_quit, "event.quit" )
- server.register_function( self.queue_event, "event.send" )
+ server.register_function( self.send_event, "event.send" )
server.socket.settimeout(1)
self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port)