Commit bb457216 authored by Andreas Schmidt's avatar Andreas Schmidt

Fix possibly uninitialized warning in feedbackReceiver.

parent 10bfc757
Pipeline #141 passed with stage
......@@ -13,6 +13,7 @@
void handle_feedback(PrrtSocket *prrtSocket, const size_t length)
{
char bufin[MAX_PAYLOAD_LENGTH];
PrrtPacket *prrtPacket = NULL;
ssize_t n;
struct sockaddr_in remote;
socklen_t addrlen = sizeof(remote);
......@@ -32,15 +33,10 @@ void handle_feedback(PrrtSocket *prrtSocket, const size_t length)
n = recvfrom(prrtSocket->feedbackSocketFd, bufin, length, 0, (struct sockaddr *) &remote, &addrlen);
check(n >= 0, "Receiving feedback failed.");
PrrtPacket *prrtPacket = calloc(1, sizeof(PrrtPacket));
prrtPacket = calloc(1, sizeof(PrrtPacket));
check_mem(prrtPacket);
PrrtPacket_decode(bufin, (uint16_t) n, prrtPacket);
//PrrtPacketFeedbackPayload* payload = prrtPacket->payload;
//struct in_addr a;
//a.s_addr = payload->receiverAddress;
//debug("Receiver Address: %s", inet_ntoa(a));
prrtTimestamp_t forwardTripTimestamp = ((PrrtPacketFeedbackPayload *) prrtPacket->payload)->forwardTripTimestamp_us;
PrrtChannelStateInformation_update_rtt(prrtSocket->csi, (prrtTimedelta_t) (receiveTime - forwardTripTimestamp));
......@@ -66,6 +62,6 @@ void *receive_feedback_loop(void *ptr)
return NULL;
error:
PERROR("Feedback reception failed.");
PERROR("Feedback reception failed.%s","");
return NULL;
}
\ No newline at end of file
Markdown is supported
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