1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-27 20:27:45 +00:00

Fix UDP send case to handle errors correctly whether BYTESWAP is defined or not (like TCP send)

This commit is contained in:
Nick Briggs
2017-05-28 19:29:59 -07:00
parent 156c3292f8
commit 349b2566da

View File

@@ -391,14 +391,11 @@ LispPTR nameConn, proto, length, bufaddr, maxlen;
#ifdef BYTESWAP
word_swap_page(buffer, (buflen + 3) >> 2);
#endif /* BYTESWAP */
if (result = sendto(sock, buffer, buflen, 0, (struct sockaddr *)&farend, sizeof farend) < 0)
result = sendto(sock, buffer, buflen, 0, (struct sockaddr *)&farend, sizeof farend);
#ifdef BYTESWAP
word_swap_page(buffer, (buflen + 3) >> 2);
#endif /* BYTESWAP */
{
if (result < 0) {
perror("UDP Send");
printf(" fd = %d, addr = 0x%x.\n", sock, farend.sin_addr.s_addr);
return (NIL);