(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:
@@ -312,9 +312,17 @@ do_request(void *buf, size_t len, int sendlength,
|
||||
len[1] = (reply.length >> 16) & 0xff;
|
||||
len[2] = (reply.length >> 8) & 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);
|
||||
}
|
||||
if(ret)
|
||||
|
Reference in New Issue
Block a user