Skip to content

CURL_GLOBAL_WIN32 should only control winsock #3313

Closed

Description

@jay

curl/lib/easy.c

Lines 226 to 230 in 1966771

if(flags & CURL_GLOBAL_WIN32)
if(win32_init()) {
DEBUGF(fprintf(stderr, "Error: win32_init failed\n"));
return CURLE_FAILED_INIT;
}

CURL_GLOBAL_WIN32 is documented to control winsock initialization but controls win32_init which sounds (and is) more encompassing, as it does sspi initialization as well. I think we should split it off into win32_winsock_init for the flag and then a general win32_init that is always called, and we can move sspi init there.

This comes from my review of #3312, since it is only necessary to call QueryPerformanceFrequency once it makes more sense for us to do it at startup (like in win32_init) rather than every single time, and save the frequency in a global structure.

Activity

  1. locked as resolved and limited conversation to collaborators on May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions