Commit ad94c4da authored by Pekka Pessi's avatar Pekka Pessi

tport_type_udp.c: gracefully handle 0-size datagrams.

Problem reported by Michael Jerris.

darcs-hash:20070326170613-55b16-f79bbdd0902b149286b1c51964b651673c21b07a.gz
parent ae97580f
......@@ -252,6 +252,11 @@ int tport_recv_dgram(tport_t *self)
su_strerror(err), err));
return -1;
}
if (N == 0) {
su_recv(self->tp_socket, sample, 1, 0);
SU_DEBUG_3(("tport(%p): zero length packet", (void *)self));
return 0;
}
#endif
veclen = tport_recv_iovec(self, &self->tp_msg, iovec, N, 1);
......
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