1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

Set errno=ENOMEM if tevent_add_fd fails

tevent_add_fd does not properly set that. At least in epoll and select this is
the only error condition.

Metze, please check!
This commit is contained in:
Volker Lendecke 2009-05-19 23:48:41 +02:00
parent f8da7f5d74
commit ac65ae9b1d

View File

@ -618,6 +618,7 @@ static int tdgram_bsd_set_readable_handler(struct tdgram_bsd *bsds,
tdgram_bsd_fde_handler,
bsds);
if (!bsds->fde) {
errno = ENOMEM;
return -1;
}
@ -669,6 +670,7 @@ static int tdgram_bsd_set_writeable_handler(struct tdgram_bsd *bsds,
tdgram_bsd_fde_handler,
bsds);
if (!bsds->fde) {
errno = ENOMEM;
return -1;
}
@ -1329,6 +1331,7 @@ static int tstream_bsd_set_readable_handler(struct tstream_bsd *bsds,
tstream_bsd_fde_handler,
bsds);
if (!bsds->fde) {
errno = ENOMEM;
return -1;
}
@ -1380,6 +1383,7 @@ static int tstream_bsd_set_writeable_handler(struct tstream_bsd *bsds,
tstream_bsd_fde_handler,
bsds);
if (!bsds->fde) {
errno = ENOMEM;
return -1;
}