diff options
author | Dean Jansa <djansa@redhat.com> | 2010-09-28 15:53:28 -0500 |
---|---|---|
committer | Dean Jansa <djansa@redhat.com> | 2010-09-28 15:53:28 -0500 |
commit | edf6032e3395baa5e2a160e4f70d3b108ae31622 (patch) | |
tree | 583c4dccccd249674adb9711b083a5597d3405ac /qarsh.c | |
parent | e96e56146dc7c11d388d25db42383993b87e8791 (diff) | |
download | qarsh-edf6032e3395baa5e2a160e4f70d3b108ae31622.tar.gz qarsh-edf6032e3395baa5e2a160e4f70d3b108ae31622.tar.xz qarsh-edf6032e3395baa5e2a160e4f70d3b108ae31622.zip |
First crack at ipv6/ipv4 agnostic qarsh/qacp.
Diffstat (limited to 'qarsh.c')
-rw-r--r-- | qarsh.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -50,6 +50,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 }; @@ -191,11 +192,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); @@ -508,7 +509,7 @@ again: sigaction(SIGALRM, &sa, NULL); alarm(max_timeout); - qarsh_fd = connect_to_host(host, port); + qarsh_fd = connect_to_host(host, port, &qarsh_ss_family); alarm(0); if (qarsh_fd == -1) { |