History log of /curl/lib/asyn-thread.c (Results 26 – 50 of 127)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 49798cac 12-Jul-2022 Alexandre Ferrieux

CURLOPT_QUICK_EXIT: don't wait for DNS thread on exit

Fixes #2975
Closes #9147


# b563a92c 01-Nov-2022 Viktor Szakats

tidy-up: process.h detection and use

This patch aims to cleanup the use of `process.h` header and the macro
`HAVE_PROCESS_H` associated with it.

- `process.h` is always availabl

tidy-up: process.h detection and use

This patch aims to cleanup the use of `process.h` header and the macro
`HAVE_PROCESS_H` associated with it.

- `process.h` is always available on Windows. In curl, it is required
only for `_beginthreadex()` in `lib/curl_threads.c`.

- `process.h` is also available in MS-DOS. In curl, its only use was in
`lib/smb.c` for `getpid()`. But `getpid()` is in fact declared by
`unistd.h`, which is always enabled via `lib/config-dos.h`. So the
header is not necessary.

- `HAVE_PROCESS_H` was detected by CMake, forced to 1 on Windows and
left to real detection for other platforms.
It was also set to always-on in `lib/config-win32.h` and
`lib/config-dos.h`.
In autotools builds, there was no detection and the macro was never
set.

Based on these observations, in this patch we:

- Rework Windows `getpid` logic in `lib/smb.c` to always use the
equivalent direct Win32 API function `GetCurrentProcessId()`, as we
already did for Windows UWP apps. This makes `process.h` unnecessary
here on Windows.

- Stop #including `process.h` into files where it was not necessary.
This is everywhere, except `lib/curl_threads.c`.

> Strangely enough, `lib/curl_threads.c` compiled fine with autotools
> because `process.h` is also indirecty included via `unistd.h`. This
> might have been broken in autotools MSVC builds, where the latter
> header is missing.

- Delete all remaining `HAVE_PROCESS_H` feature guards, for they were
unnecessary.

- Delete `HAVE_PROCESS_H` detection from CMake and predefined values
from `lib/config-*.h` headers.

Reviewed-by: Jay Satiro
Closes #9703

show more ...


# 279834dd 24-Oct-2022 Daniel Stenberg

misc: remove duplicated include files

Closes #9796


# 46f3fe0e 21-Sep-2022 Daniel Stenberg

hostip: lazily wait to figure out if IPv6 works until needed

The check may take many milliseconds, so now it is performed once the
value is first needed. Also, this change makes sure tha

hostip: lazily wait to figure out if IPv6 works until needed

The check may take many milliseconds, so now it is performed once the
value is first needed. Also, this change makes sure that the value is
not used if the resolve is set to be IPv4-only.

Closes #9553

show more ...


# 1902e8fc 19-Sep-2022 Dmitry Karpov

resolve: make forced IPv4 resolve only use A queries

This protects IPv4-only transfers from undesired bad IPv6-related side
effects and make IPv4 transfers in dual-stack libcurl behave t

resolve: make forced IPv4 resolve only use A queries

This protects IPv4-only transfers from undesired bad IPv6-related side
effects and make IPv4 transfers in dual-stack libcurl behave the same
way as in IPv4 single-stack libcurl.

Closes #9540

show more ...


# f236595e 14-Aug-2022 Daniel Stenberg

asyn-thread: fix socket leak on OOM

Closes #9310


# 451bcc1a 12-Jul-2022 Daniel Stenberg

asyn-thread: make getaddrinfo_complete return CURLcode

... as the only caller that cares about what it returns assumes that
anyway. This caused icc to warn:

asyn-thread.c(505):

asyn-thread: make getaddrinfo_complete return CURLcode

... as the only caller that cares about what it returns assumes that
anyway. This caused icc to warn:

asyn-thread.c(505): error #188: enumerated type mixed with another type
result = getaddrinfo_complete(data);

Repoorted-by: Matthew Thompson
Bug: https://github.com/curl/curl/issues/9081#issuecomment-1182143076
Closes #9146

show more ...


# ad9bc597 17-May-2022 max.mehl

copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the

copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869

show more ...


# fe7b6422 08-Sep-2021 Daniel Stenberg

strerror.h: remove the #include from files not using it


# 84d28397 24-Apr-2021 Lucas Clemente Vella

CURLOPT_IPRESOLVE: preventing wrong IP version from being used

In some situations, it was possible that a transfer was setup to
use an specific IP version, but due do DNS caching or conn

CURLOPT_IPRESOLVE: preventing wrong IP version from being used

In some situations, it was possible that a transfer was setup to
use an specific IP version, but due do DNS caching or connection
reuse, it ended up using a different IP version from requested.

This commit changes the effect of CURLOPT_IPRESOLVE from simply
restricting address resolution to preventing the wrong connection
type being used, when choosing a connection from the pool, and
to restricting what addresses could be used when establishing
a new connection.

It is important that all addresses versions are resolved, even if
not used in that transfer in particular, because the result is
cached, and could be useful for a different transfer with a
different CURLOPT_IPRESOLVE setting.

Closes #6853

show more ...


# 063d3f3b 19-Apr-2021 Daniel Stenberg

tidy-up: make conditional checks more consistent

... remove '== NULL' and '!= 0'

Closes #6912


Revision tags: curl-7_76_1, curl-7_76_0
# 692faeab 18-Feb-2021 Daniel Stenberg

asyn-ares: use consistent resolve error message

... with the help of Curl_resolver_error() which now is moved from
asyn-thead.c and is provided globally for this purpose.

Follow

asyn-ares: use consistent resolve error message

... with the help of Curl_resolver_error() which now is moved from
asyn-thead.c and is provided globally for this purpose.

Follow-up to 35ca04ce1b77636

Makes test 1188 work for c-ares builds

Closes #6626

show more ...


Revision tags: curl-7_75_0
# b9f11ae8 25-Jan-2021 Jay Satiro

lib: drop USE_SOCKETPAIR in favor of CURL_DISABLE_SOCKETPAIR

.. since the former is undocumented and they both do the same thing.

Closes https://github.com/curl/curl/pull/6517


# 44c9e18e 26-Jan-2021 Jay Satiro

asyn-thread: fix build for when getaddrinfo missing

This is a follow-up to 8315343 which several days ago moved the resolver
pointer into the async struct but did not update the code tha

asyn-thread: fix build for when getaddrinfo missing

This is a follow-up to 8315343 which several days ago moved the resolver
pointer into the async struct but did not update the code that uses it
when getaddrinfo is not present.

Closes https://github.com/curl/curl/pull/6536

show more ...


# 1dc8aa87 24-Jan-2021 Daniel Stenberg

hostip/proxy: remove conn->data use

Closes #6513


# 8335c641 20-Jan-2021 Daniel Stenberg

hostip: remove conn->data from resolver functions

This also moves the 'async' struct from the connectdata struct into the
Curl_easy struct, which seems like a better home for it.

hostip: remove conn->data from resolver functions

This also moves the 'async' struct from the connectdata struct into the
Curl_easy struct, which seems like a better home for it.

Closes #6497

show more ...


# 0a582757 16-Jan-2021 Erik Olsson

lib: save a bit of space with some structure packing

- Reorder some internal struct members so that less padding is used.

This is an attempt at saving a bit of space by packing some

lib: save a bit of space with some structure packing

- Reorder some internal struct members so that less padding is used.

This is an attempt at saving a bit of space by packing some structs
(using pahole to find the holes) where it might make sense to do
so without losing readability.

I.e., I tried to avoid separating fields that seem grouped
together (like the cwd... fields in struct ftp_conn for instance).
Also abstained from touching fields behind conditional macros as
that quickly can get complicated.

Closes https://github.com/curl/curl/pull/6483

show more ...


# 215db086 08-Jan-2021 Daniel Stenberg

lib: pass in 'struct Curl_easy *' to most functions

... in most cases instead of 'struct connectdata *' but in some cases in
addition to.

- We mostly operate on transfers and no

lib: pass in 'struct Curl_easy *' to most functions

... in most cases instead of 'struct connectdata *' but in some cases in
addition to.

- We mostly operate on transfers and not connections.

- We need the transfer handle to log, store data and more. Everything in
libcurl is driven by a transfer (the CURL * in the public API).

- This work clarifies and separates the transfers from the connections
better.

- We should avoid "conn->data". Since individual connections can be used
by many transfers when multiplexing, making sure that conn->data
points to the current and correct transfer at all times is difficult
and has been notoriously error-prone over the years. The goal is to
ultimately remove the conn->data pointer for this reason.

Closes #6425

show more ...


# aba01da6 23-Dec-2020 Daniel Stenberg

failf: remove newline from formatting strings

... as failf adds one itself.

Also: add an assert() to failf() that triggers on a newline in the
format string!

Closes #63

failf: remove newline from formatting strings

... as failf adds one itself.

Also: add an assert() to failf() that triggers on a newline in the
format string!

Closes #6365

show more ...


Revision tags: curl-7_74_0
# 37cdc2a0 23-Nov-2020 Daniel Stenberg

asyn: use 'struct thread_data *' instead of 'void *'

To reduce use of types that can't be checked at compile time. Also
removes several typecasts.

... and rename the struct fiel

asyn: use 'struct thread_data *' instead of 'void *'

To reduce use of types that can't be checked at compile time. Also
removes several typecasts.

... and rename the struct field from 'os_specific' to 'tdata'.

Closes #6239
Reviewed-by: Jay Satiro

show more ...


# 4d2f8006 04-Nov-2020 Daniel Stenberg

curl.se: new home

Closes #6172


Revision tags: curl-7_73_0, tiny-curl-7_72_0, curl-7_72_0, curl-7_71_1, curl-7_71_0
# f3d501dc 27-May-2020 Daniel Stenberg

build: disable more code/data when built without proxy support

Added build to travis to verify

Closes #5466


# 842f73de 28-May-2020 Daniel Stenberg

timeouts: change millisecond timeouts to timediff_t from time_t

For millisecond timers we like timediff_t better. Also, time_t can be
unsigned so returning a negative value doesn't work

timeouts: change millisecond timeouts to timediff_t from time_t

For millisecond timers we like timediff_t better. Also, time_t can be
unsigned so returning a negative value doesn't work then.

Closes #5479

show more ...


# 8df45547 13-May-2020 Daniel Stenberg

source cleanup: remove all custom typedef structs

- Stick to a single unified way to use structs
- Make checksrc complain on 'typedef struct {'
- Allow them in tests, public heade

source cleanup: remove all custom typedef structs

- Stick to a single unified way to use structs
- Make checksrc complain on 'typedef struct {'
- Allow them in tests, public headers and examples

- Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
typedef different types/structs depending on build conditions.

Closes #5338

show more ...


# 66b07757 13-May-2020 Daniel Stenberg

checksrc: enhance the ASTERISKSPACE and update code accordingly

Fine: "struct hello *world"

Not fine: "struct hello* world" (and variations)

Closes #5386


123456