- Fix #1251: WSAPoll first argument cannot be NULL.

This commit is contained in:
W.C.A. Wijngaards 2025-03-18 13:59:53 +01:00
parent 13afde2cad
commit b0d20e2d28
2 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,6 @@
18 March 2025: Wouter
- Fix #1251: WSAPoll first argument cannot be NULL.
17 March 2025: Wouter 17 March 2025: Wouter
- Fix representation of types GPOS and RESINFO, add rdf type for - Fix representation of types GPOS and RESINFO, add rdf type for
unquoted str. unquoted str.

View file

@ -442,7 +442,11 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
int pret; int pret;
memset(&p, 0, sizeof(p)); memset(&p, 0, sizeof(p));
p.fd = c->fd; p.fd = c->fd;
p.events = POLLOUT | POLLERR | POLLHUP; p.events = POLLOUT | POLLERR
#ifndef USE_WINSOCK
| POLLHUP
#endif
;
# ifndef USE_WINSOCK # ifndef USE_WINSOCK
pret = poll(&p, 1, SEND_BLOCKED_WAIT_TIMEOUT); pret = poll(&p, 1, SEND_BLOCKED_WAIT_TIMEOUT);
# else # else
@ -496,7 +500,8 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
#ifndef USE_WINSOCK #ifndef USE_WINSOCK
pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1));
#else #else
pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); Sleep((SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1));
pret = 0;
#endif #endif
if(pret < 0 && if(pret < 0 &&
#ifndef USE_WINSOCK #ifndef USE_WINSOCK
@ -751,7 +756,11 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
int pret; int pret;
memset(&p, 0, sizeof(p)); memset(&p, 0, sizeof(p));
p.fd = c->fd; p.fd = c->fd;
p.events = POLLOUT | POLLERR | POLLHUP; p.events = POLLOUT | POLLERR
#ifndef USE_WINSOCK
| POLLHUP
#endif
;
# ifndef USE_WINSOCK # ifndef USE_WINSOCK
pret = poll(&p, 1, SEND_BLOCKED_WAIT_TIMEOUT); pret = poll(&p, 1, SEND_BLOCKED_WAIT_TIMEOUT);
# else # else
@ -805,7 +814,8 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
#ifndef USE_WINSOCK #ifndef USE_WINSOCK
pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1));
#else #else
pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); Sleep((SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1));
pret = 0;
#endif #endif
if(pret < 0 && if(pret < 0 &&
#ifndef USE_WINSOCK #ifndef USE_WINSOCK