summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/uievent.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/uievent.py b/bitbake/lib/bb/ui/uievent.py
index 28817a22f7..0b9a836d0f 100644
--- a/bitbake/lib/bb/ui/uievent.py
+++ b/bitbake/lib/bb/ui/uievent.py
@@ -37,6 +37,17 @@ class BBUIEventQueue:
37 self.BBServer = BBServer 37 self.BBServer = BBServer
38 self.clientinfo = clientinfo 38 self.clientinfo = clientinfo
39 39
40 server = UIXMLRPCServer(self.clientinfo)
41 self.host, self.port = server.socket.getsockname()
42
43 server.register_function( self.system_quit, "event.quit" )
44 server.register_function( self.send_event, "event.sendpickle" )
45 server.socket.settimeout(1)
46
47 self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port)
48
49 self.server = server
50
40 self.t = threading.Thread() 51 self.t = threading.Thread()
41 self.t.setDaemon(True) 52 self.t.setDaemon(True)
42 self.t.run = self.startCallbackHandler 53 self.t.run = self.startCallbackHandler
@@ -73,19 +84,9 @@ class BBUIEventQueue:
73 84
74 def startCallbackHandler(self): 85 def startCallbackHandler(self):
75 86
76 server = UIXMLRPCServer(self.clientinfo) 87 while not self.server.quit:
77 self.host, self.port = server.socket.getsockname() 88 self.server.handle_request()
78 89 self.server.server_close()
79 server.register_function( self.system_quit, "event.quit" )
80 server.register_function( self.send_event, "event.sendpickle" )
81 server.socket.settimeout(1)
82
83 self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port)
84
85 self.server = server
86 while not server.quit:
87 server.handle_request()
88 server.server_close()
89 90
90 def system_quit( self ): 91 def system_quit( self ):
91 """ 92 """