diff options
Diffstat (limited to 'qarsh.c')
-rw-r--r-- | qarsh.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -51,6 +51,7 @@ /* Globals */ int qarsh_fd = -1; /* The control connection to qarshd */ +unsigned short qarsh_ss_family; /* AF_INET/AF_INET6, set on connect */ hbeat_t qarsh_hb; /* Heartbeat handle */ int signal_to_send = 0; int sigs_to_propogate[] = { SIGINT, SIGTERM, SIGHUP, SIGUSR1, SIGUSR2 }; @@ -192,11 +193,11 @@ run_remote_cmd(char *cmdline) struct timespec timeout; short cmd_finished; - l_in = bind_any(QARSH_MINPORT); + l_in = bind_any(QARSH_MINPORT, qarsh_ss_family); p_in = getsockport(l_in); - l_out = bind_any(QARSH_MINPORT); + l_out = bind_any(QARSH_MINPORT, qarsh_ss_family); p_out = getsockport(l_out); - l_err = bind_any(QARSH_MINPORT); + l_err = bind_any(QARSH_MINPORT, qarsh_ss_family); p_err = getsockport(l_err); qp = make_qp_runcmd(cmdline, p_in, p_out, p_err); @@ -509,7 +510,7 @@ again: sigaction(SIGALRM, &sa, NULL); alarm(CONNECT_TIMEOUT); - qarsh_fd = connect_to_host(host, port); + qarsh_fd = connect_to_host(host, port, &qarsh_ss_family); alarm(0); if (qarsh_fd == -1) { |