Commit df8c6443 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Debug format.

parent 0edece32
Pipeline #2968 passed with stages
in 1 minute and 41 seconds
......@@ -73,7 +73,7 @@ echo "Running PRRT with command: \"$command $PRRT_PARAMS\" and link parameters:
tc qdisc add dev $dev root netem $NETEM_PARAMS
LOG=`/prrt/$command $PRRT_PARAMS 2>&1`
printf "$LOG"
printf "$LOG\n"
echo "Exit status: $?"
dur=$(echo "$(date +%s.%N) - $start" | bc);
printf "Done after %.6f seconds\n" $dur
......
......@@ -133,7 +133,7 @@ static inline ssize_t _send(socket_t conn, const char *buf, size_t size)
n = send(conn, buf, size - written, 0);
if (n < 0) {
_time();
printf("RECEIVE FAILED: %ld, errno: %d\n, written %ld / %ld", n, errno, written, size);
printf("SEND FAILED: %ld, errno: %d, written: %ld / %lu\n", n, errno, written, size);
printf("%s\n", buf - written);
return written;
}
......@@ -179,7 +179,7 @@ static inline ssize_t _recv(socket_t conn, char *buf, size_t size)
n = recv(conn, buf, size - received, 0);
if (n < 0) {
_time();
printf("recv failed: %ld, errno: %d, received: %ld, size: %lu\n", n, errno, received, size);
printf("RECV FAILED: %ld, errno: %d, received: %ld / %lu\n", n, errno, received, size);
return -1;
}
if (n == 0) {
......
......@@ -184,7 +184,6 @@ int main(int argc, char **argv) {
memcpy(buf + 20, &now, sizeof(struct timespec));
ssize_t written = _send(s, buf, payload_length);
if (written != payload_length) {
printf("Could not write the full packet: %ld / %ld.\n", written, payload_length);
break;
}
......
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