(do_request): check for errors from `sendto'

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5049 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1998-06-30 16:09:08 +00:00
parent f9b8c2a15a
commit 2d029408aa

View File

@@ -312,9 +312,17 @@ do_request(void *buf, size_t len, int sendlength,
len[1] = (reply.length >> 16) & 0xff; len[1] = (reply.length >> 16) & 0xff;
len[2] = (reply.length >> 8) & 0xff; len[2] = (reply.length >> 8) & 0xff;
len[3] = reply.length & 0xff; len[3] = reply.length & 0xff;
sendto(socket, len, sizeof(len), 0, from, from_len); if(sendto(socket, len, sizeof(len), 0, from, from_len) < 0) {
kdc_log (0, "sendto(%s): %s", addr, strerror(errno));
krb5_data_free(&reply);
return;
}
}
if(sendto(socket, reply.data, reply.length, 0, from, from_len) < 0) {
kdc_log (0, "sendto(%s): %s", addr, strerror(errno));
krb5_data_free(&reply);
return;
} }
sendto(socket, reply.data, reply.length, 0, from, from_len);
krb5_data_free(&reply); krb5_data_free(&reply);
} }
if(ret) if(ret)