return map_nt_error_from_unix(errno);
}
+ if (!(flags & SOCKET_FLAG_BLOCK)) {
+ int ret = set_blocking(new_fd, False);
+ if (ret == -1) {
+ close(new_fd);
+ return map_nt_error_from_unix(errno);
+ }
+ }
+
/* TODO: we could add a 'accept_check' hook here
* which get the black/white lists via socket_set_accept_filter()
* or something like that
return unixdom_error(errno);
}
+ if (!(flags & SOCKET_FLAG_BLOCK)) {
+ int ret = set_blocking(new_fd, False);
+ if (ret == -1) {
+ close(new_fd);
+ return map_nt_error_from_unix(errno);
+ }
+ }
+
(*new_sock) = talloc_p(NULL, struct socket_context);
if (!(*new_sock)) {
close(new_fd);