mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:43:32 +03:00
parent
943ac04fc4
commit
da04aa96ab
6 changed files with 15 additions and 15 deletions
|
|
@ -788,11 +788,11 @@ static void queue_udp_clear(void)
|
|||
}
|
||||
|
||||
/* this is an answer to a question */
|
||||
static struct udp_resp *
|
||||
udp_resp_create(int query_id,
|
||||
const struct sockaddr *addr, curl_socklen_t addrlen,
|
||||
const unsigned char *qbuf, size_t qlen,
|
||||
uint16_t qtype, uint16_t id)
|
||||
static struct udp_resp *udp_resp_create(int query_id,
|
||||
const struct sockaddr *addr,
|
||||
curl_socklen_t addrlen,
|
||||
const unsigned char *qbuf, size_t qlen,
|
||||
uint16_t qtype, uint16_t id)
|
||||
{
|
||||
struct udp_resp *resp;
|
||||
timediff_t delay_ms = 0;
|
||||
|
|
@ -803,7 +803,7 @@ udp_resp_create(int query_id,
|
|||
|
||||
resp->query_id = query_id;
|
||||
/* on some platforms `curl_socklen_t` is an `int`. Casting might
|
||||
* wrap this, but then it still has to fit our record size. */
|
||||
* wrap this, but then it still has to fit our record size. */
|
||||
if((size_t)addrlen > sizeof(resp->addr)) {
|
||||
logmsg("[%d-UDP] unable to handle addrlen of %zu",
|
||||
query_id, (size_t)addrlen);
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ storerequest_cleanup:
|
|||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
}
|
||||
|
||||
static bool initiate_exit(int signum) /* stay signal-safe */
|
||||
static bool initiate_exit(int signum) /* keep signal-safe */
|
||||
{
|
||||
if(got_exit_signal == 0) {
|
||||
got_exit_signal = 1;
|
||||
|
|
@ -371,7 +371,7 @@ static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
|
|||
* the POSIX specification:
|
||||
* https://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html#tag_02_04_03
|
||||
*/
|
||||
static void exit_signal_handler(int signum) /* stay signal-safe */
|
||||
static void exit_signal_handler(int signum) /* keep signal-safe */
|
||||
{
|
||||
int old_errno = errno;
|
||||
exit_msg = "exit_signal_handler(): triggered";
|
||||
|
|
@ -421,7 +421,7 @@ static SIGHANDLER_T set_signal(int signum, SIGHANDLER_T handler, int norestart)
|
|||
* application, such as one in UNIX, to become multi-threaded and cause
|
||||
* unexpected behavior.
|
||||
*/
|
||||
static BOOL WINAPI ctrl_event_handler(DWORD dwCtrlType) /* stay signal-safe */
|
||||
static BOOL WINAPI ctrl_event_handler(DWORD dwCtrlType) /* keep signal-safe */
|
||||
{
|
||||
static const char msgU[] = "ctrl_event_handler(): unhandled\n";
|
||||
static const char msgH[] = "ctrl_event_handler(): handled\n";
|
||||
|
|
@ -1111,6 +1111,7 @@ int open_stream_sock(curl_socket_t *psock, uint16_t *pport)
|
|||
result = 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
switch(localaddr.sa.sa_family) {
|
||||
case AF_INET:
|
||||
port = ntohs(localaddr.sa4.sin_port);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue