diff options
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", |