Fix local socket communication
Don't try to send 'None' argument. Close writing end after sending full request. QubesOS/qubes-issues#853
This commit is contained in:
parent
3e73b242d1
commit
45ab24ce12
@ -109,12 +109,15 @@ class QubesLocal(QubesBase):
|
||||
|
||||
# src, method, dest, arg
|
||||
for call_arg in ('dom0', method, dest, arg):
|
||||
client_socket.sendall(call_arg.encode('ascii'))
|
||||
if call_arg is not None:
|
||||
client_socket.sendall(call_arg.encode('ascii'))
|
||||
client_socket.sendall(b'\0')
|
||||
if payload is not None:
|
||||
client_socket.sendall(payload)
|
||||
|
||||
return_data = b''.join(iter(client_socket.recv(BUF_SIZE), b''))
|
||||
client_socket.shutdown(socket.SHUT_WR)
|
||||
|
||||
return_data = b''.join(iter(lambda: client_socket.recv(BUF_SIZE), b''))
|
||||
return self._parse_qubesd_response(return_data)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user