summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/server/xmlrpc.py4
-rw-r--r--bitbake/lib/bb/ui/uievent.py7
2 files changed, 6 insertions, 5 deletions
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py
index c53cee488a..eff80098a2 100644
--- a/bitbake/lib/bb/server/xmlrpc.py
+++ b/bitbake/lib/bb/server/xmlrpc.py
@@ -247,9 +247,9 @@ class BitbakeServerInfo():
247 self.port = port 247 self.port = port
248 248
249class BitBakeServerConnection(): 249class BitBakeServerConnection():
250 def __init__(self, serverinfo): 250 def __init__(self, serverinfo, clientinfo=("localhost", 0)):
251 self.connection = _create_server(serverinfo.host, serverinfo.port) 251 self.connection = _create_server(serverinfo.host, serverinfo.port)
252 self.events = uievent.BBUIEventQueue(self.connection) 252 self.events = uievent.BBUIEventQueue(self.connection, clientinfo)
253 for event in bb.event.ui_queue: 253 for event in bb.event.ui_queue:
254 self.events.queue_event(event) 254 self.events.queue_event(event)
255 255
diff --git a/bitbake/lib/bb/ui/uievent.py b/bitbake/lib/bb/ui/uievent.py
index 0e738174e7..28817a22f7 100644
--- a/bitbake/lib/bb/ui/uievent.py
+++ b/bitbake/lib/bb/ui/uievent.py
@@ -28,13 +28,14 @@ import socket, threading, pickle
28from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler 28from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
29 29
30class BBUIEventQueue: 30class BBUIEventQueue:
31 def __init__(self, BBServer): 31 def __init__(self, BBServer, clientinfo=("localhost, 0")):
32 32
33 self.eventQueue = [] 33 self.eventQueue = []
34 self.eventQueueLock = threading.Lock() 34 self.eventQueueLock = threading.Lock()
35 self.eventQueueNotify = threading.Event() 35 self.eventQueueNotify = threading.Event()
36 36
37 self.BBServer = BBServer 37 self.BBServer = BBServer
38 self.clientinfo = clientinfo
38 39
39 self.t = threading.Thread() 40 self.t = threading.Thread()
40 self.t.setDaemon(True) 41 self.t.setDaemon(True)
@@ -72,7 +73,7 @@ class BBUIEventQueue:
72 73
73 def startCallbackHandler(self): 74 def startCallbackHandler(self):
74 75
75 server = UIXMLRPCServer() 76 server = UIXMLRPCServer(self.clientinfo)
76 self.host, self.port = server.socket.getsockname() 77 self.host, self.port = server.socket.getsockname()
77 78
78 server.register_function( self.system_quit, "event.quit" ) 79 server.register_function( self.system_quit, "event.quit" )
@@ -98,7 +99,7 @@ class BBUIEventQueue:
98 99
99class UIXMLRPCServer (SimpleXMLRPCServer): 100class UIXMLRPCServer (SimpleXMLRPCServer):
100 101
101 def __init__( self, interface = ("localhost", 0) ): 102 def __init__( self, interface ):
102 self.quit = False 103 self.quit = False
103 SimpleXMLRPCServer.__init__( self, 104 SimpleXMLRPCServer.__init__( self,
104 interface, 105 interface,