Skip to content

Commit a2c5829

Browse files
committed
qrexec-client: do not prepare event loop for VM -> VM calls
For a VM -> VM service call, no local program will be run and the main event loop will not be entered. Therefore, preparing for the main loop to run is unnecessary. This also clarifies what actually does and does not need to be done for VM -> VM calls.
1 parent 5a62613 commit a2c5829

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

daemon/qrexec-client.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,6 @@ int main(int argc, char **argv)
693693
wait_connection_end = s;
694694
else
695695
close(s);
696-
set_remote_domain(domname);
697-
struct buffer stdin_buffer;
698-
buffer_init(&stdin_buffer);
699-
prepare_ret = prepare_local_fds(local_cmdline, &stdin_buffer);
700696
if (request_id) {
701697
s = connect_unix_socket(src_domain_id_str);
702698
send_service_connect(s, request_id, data_domain, data_port);
@@ -709,6 +705,10 @@ int main(int argc, char **argv)
709705
poll(fds, 1, -1);
710706
}
711707
} else {
708+
set_remote_domain(domname);
709+
struct buffer stdin_buffer;
710+
buffer_init(&stdin_buffer);
711+
prepare_ret = prepare_local_fds(local_cmdline, &stdin_buffer);
712712
data_vchan = libvchan_server_init(data_domain, data_port,
713713
VCHAN_BUFFER_SIZE, VCHAN_BUFFER_SIZE);
714714
if (!data_vchan) {

0 commit comments

Comments
 (0)