- }
- qp = para_malloc(sizeof(struct queued_packet));
- hc->pq_bytes += len;
- qp->packet = para_malloc(len);
- memcpy(qp->packet, buf, len);
- qp->len = len;
- list_add_tail(&qp->node, &hc->packet_queue);
- PARA_INFO_LOG("%lu bytes queued for fd %d\n", hc->pq_bytes, hc->fd);
+ qc = para_malloc(sizeof(struct queued_chunk));
+ hc->cq_bytes += len;
+ qc->chunk_num = chunk_num;
+ qc->sent = sent;
+ list_add_tail(&qc->node, &hc->chunk_queue);
+ PARA_INFO_LOG("%lu bytes queued for fd %d\n", hc->cq_bytes, hc->fd);