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 /qacp.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 'qacp.c')
-rw-r--r-- | qacp.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -49,6 +49,7 @@ /* Globals */ int qacp_fd = -1; /* The control connection to qacpd */ +unsigned short qarsh_ss_family; /* AF_INET/AF_INET6, set on connect */ short quiet = 0; void @@ -148,7 +149,7 @@ qacp_sendonefile(const char *host, const char *srcfile, const char *destfile) exit(errno); } - sd = bind_any(QARSH_MINPORT); + sd = bind_any(QARSH_MINPORT, qarsh_ss_family); port = getsockport(sd); /* Recall that the packet types are qarshd-centric, so if we want @@ -251,7 +252,7 @@ qacp_recvonefile(const char *host, const char *srcfile, const char *destfile) fchmod(outfd, rstatp->qp_st_mode); - sd = bind_any(QARSH_MINPORT); + sd = bind_any(QARSH_MINPORT, qarsh_ss_family); port = getsockport(sd); /* Recall that the packet types are qarshd-centric, so if we want @@ -420,7 +421,7 @@ recvfiles(char **argv, int argc, int fileidx, short recursive) ruser = strdup(pw->pw_name); } - qacp_fd = connect_to_host(rhost, QARSHD_CONTROL_PORT); + qacp_fd = connect_to_host(rhost, QARSHD_CONTROL_PORT, &qarsh_ss_family); if (qacp_fd == -1) { if (errno == 0) { fprintf(stderr, "Could not connect to %s:%d, %d: %s\n", @@ -526,7 +527,7 @@ sendfiles(char **argv, int argc, int fileidx, short recursive) ruser = strdup(pw->pw_name); } - qacp_fd = connect_to_host(rhost, QARSHD_CONTROL_PORT); + qacp_fd = connect_to_host(rhost, QARSHD_CONTROL_PORT, &qarsh_ss_family); if (qacp_fd == -1) { if (errno == 0) { fprintf(stderr, "Could not connect to %s:%d, %d: %s\n", |