summaryrefslogtreecommitdiffstats
path: root/qacp.c
diff options
context:
space:
mode:
Diffstat (limited to 'qacp.c')
-rw-r--r--qacp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/qacp.c b/qacp.c
index c6c143e..ccfa7ce 100644
--- a/qacp.c
+++ b/qacp.c
@@ -51,6 +51,7 @@
int qacp_fd = -1; /* The control connection to qacpd */
unsigned short qarsh_ss_family; /* AF_INET/AF_INET6, set on connect */
short quiet = 0;
+int packet_seq = 1;
void
usage()
@@ -71,7 +72,7 @@ set_remote_user(char *user, char *group)
struct qa_packet *qp;
qp = make_qp_setuser(user, group);
- qp->qp_seq = 1;
+ qp->qp_seq = packet_seq++;
send_packet(qacp_fd, qp);
qpfree(qp);
qp = recv_packet(qacp_fd);
@@ -96,6 +97,7 @@ qacp_rstat(const char *rmtpath, int *rstaterrno)
struct qp_rstat_pkt *rstatp;
qp = make_qp_rstat(rmtpath, NULL);
+ qp->qp_seq = packet_seq++;
send_packet(qacp_fd, qp);
qpfree(qp);
@@ -157,7 +159,7 @@ qacp_sendonefile(const char *host, const char *srcfile, const char *destfile)
* qarshd to recv a file. */
qp = make_qp_recvfile(destfile, port, sb.st_size, sb.st_mode);
- qp->qp_seq = 1;
+ qp->qp_seq = packet_seq++;
send_packet(qacp_fd, qp);
qpfree(qp);
@@ -260,7 +262,7 @@ qacp_recvonefile(const char *host, const char *srcfile, const char *destfile)
* qarshd to send a file. */
qp = make_qp_sendfile(srcfile, port);
- qp->qp_seq = 1;
+ qp->qp_seq = packet_seq++;
send_packet(qacp_fd, qp);
qpfree(qp);