Commit 5b8516a6 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Removing packets from correct list.

parent 5a54cd7e
......@@ -14,7 +14,7 @@ void retrieve_data_blocks(PrrtSocket *sock_ptr, uint16_t base_seqno, uint8_t k,
LIST_FOREACH(res, first, next, cur) {
PrrtPacket *packetPtr = cur->value;
PrrtBlock_insert_data_packet(block, packetPtr);
sock_ptr->blockStore = BPTree_delete(sock_ptr->blockStore, packetPtr->seqno);
sock_ptr->dataStore = BPTree_delete(sock_ptr->dataStore, packetPtr->seqno);
}
}
......@@ -79,7 +79,6 @@ void receive_data_loop(void *ptr) {
while (1) {
memset(buffer, 0, MAX_PAYLOAD_LENGTH);
n = recvfrom(sock_ptr->dataSocketFd, buffer, MAX_PAYLOAD_LENGTH, 0, (struct sockaddr *) &remote, &addrlen);
check(send_feedback(sock_ptr, remote) == EXIT_SUCCESS, "Sending feedback failed.");
packet = calloc(1, sizeof(PrrtPacket));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment