|
|
@ -732,12 +732,9 @@ static void process_errors(grpc_tcp* tcp) { |
|
|
|
/* There was no control message found. It was probably spurious. */ |
|
|
|
/* There was no control message found. It was probably spurious. */ |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
auto cmsg = CMSG_FIRSTHDR(&msg); |
|
|
|
bool seen = false; |
|
|
|
if (cmsg == nullptr || cmsg->cmsg_len == 0) { |
|
|
|
for (auto cmsg = CMSG_FIRSTHDR(&msg); cmsg && cmsg->cmsg_len; |
|
|
|
/* No control message found. */ |
|
|
|
cmsg = CMSG_NXTHDR(&msg, cmsg)) { |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
if (cmsg->cmsg_level != SOL_SOCKET || |
|
|
|
if (cmsg->cmsg_level != SOL_SOCKET || |
|
|
|
cmsg->cmsg_type != SCM_TIMESTAMPING) { |
|
|
|
cmsg->cmsg_type != SCM_TIMESTAMPING) { |
|
|
|
/* Got a control message that is not a timestamp. Don't know how to
|
|
|
|
/* Got a control message that is not a timestamp. Don't know how to
|
|
|
@ -749,8 +746,12 @@ static void process_errors(grpc_tcp* tcp) { |
|
|
|
} |
|
|
|
} |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
cmsg = CMSG_NXTHDR(&msg, process_timestamp(tcp, &msg, cmsg)); |
|
|
|
cmsg = process_timestamp(tcp, &msg, cmsg); |
|
|
|
} while (cmsg && cmsg->cmsg_len); |
|
|
|
seen = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!seen) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|