summaryrefslogtreecommitdiffstats
path: root/qarsh_packet.c
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2013-09-27 11:42:39 -0400
committerNathan Straz <nstraz@redhat.com>2013-10-02 14:11:33 -0400
commit837ff5d713c667f2ea0d111333098dad3175e9b8 (patch)
tree311caf43e66721deec3c6a87ec6ea04dc2470205 /qarsh_packet.c
parentdb70c6e59af1634d3734019e6e2e17c95f6c6d97 (diff)
downloadqarsh-837ff5d713c667f2ea0d111333098dad3175e9b8.tar.gz
qarsh-837ff5d713c667f2ea0d111333098dad3175e9b8.tar.xz
qarsh-837ff5d713c667f2ea0d111333098dad3175e9b8.zip
Remove offset from data packet
We really don't need this field since we always copy data sequentially.
Diffstat (limited to 'qarsh_packet.c')
-rw-r--r--qarsh_packet.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/qarsh_packet.c b/qarsh_packet.c
index 1f170f6..f657dd1 100644
--- a/qarsh_packet.c
+++ b/qarsh_packet.c
@@ -354,7 +354,6 @@ void
parse_qp_data(char *buf, int *buflen, struct qa_packet *qp)
{
buf = fetch_uint8(buf, buflen, (int *)&(qp->qp_data.qp_remfd));
- buf = fetch_off_t(buf, buflen, &(qp->qp_data.qp_offset));
buf = fetch_int(buf, buflen, (int *)&(qp->qp_data.qp_count));
if (qp->qp_data.qp_count > *buflen) {
lprintf(LOG_ERR, "Blob is larger than rest of packet, %d > %d\n",
@@ -528,7 +527,6 @@ char *
store_qp_data(char *buf, struct qa_packet *qp)
{
buf = store_uint8(buf, qp->qp_data.qp_remfd);
- buf = store_off_t(buf, qp->qp_data.qp_offset);
buf = store_void(buf, qp->qp_data.qp_count, qp->qp_data.qp_blob);
return buf;
}
@@ -716,7 +714,7 @@ make_qp_rstat(const char *path, const struct stat *sb)
}
struct qa_packet *
-make_qp_data(const int remfd, const off_t offset, const int count, void *blob)
+make_qp_data(const int remfd, const int count, void *blob)
{
struct qa_packet *qp;
qp = malloc(sizeof *qp);
@@ -725,7 +723,6 @@ make_qp_data(const int remfd, const off_t offset, const int count, void *blob)
qp->qp_type = QP_DATA;
qp->qp_data.qp_remfd = remfd;
- qp->qp_data.qp_offset = offset;
qp->qp_data.qp_count = count;
/* data packets are different, the blob is just a pointer which
* must stick around until after the packet is sent. This is to
@@ -891,8 +888,8 @@ dump_qp_rstat(struct qa_packet *qp)
void
dump_qp_data(struct qa_packet *qp)
{
- lprintf(LOG_DEBUG, "remfd: %d offset: %lld count: %d",
- qp->qp_data.qp_remfd, (long long int)qp->qp_data.qp_offset, qp->qp_data.qp_count);
+ lprintf(LOG_DEBUG, "remfd: %d count: %d",
+ qp->qp_data.qp_remfd, qp->qp_data.qp_count);
}
void