MCPcopy Index your code
hub / github.com/MapServer/MapServer / msHTTPInit

Function msHTTPInit

maphttp.c:70–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68static int gbCurlInitialized = MS_FALSE;
69
70int msHTTPInit()
71{
72 /* curl_global_init() should only be called once (no matter how
73 * many threads or libcurl sessions that'll be used) by every
74 * application that uses libcurl.
75 */
76
77 msAcquireLock(TLOCK_OWS);
78 if (!gbCurlInitialized &&
79 curl_global_init(CURL_GLOBAL_ALL) != 0)
80 {
81 msReleaseLock(TLOCK_OWS);
82 msSetError(MS_HTTPERR, "Libcurl initialization failed.",
83 "msHTTPInit()");
84 return MS_FAILURE;
85 }
86
87 gbCurlInitialized = MS_TRUE;
88
89 msReleaseLock(TLOCK_OWS);
90 return MS_SUCCESS;
91}
92
93
94/**********************************************************************

Callers 1

msHTTPExecuteRequestsFunction · 0.85

Calls 3

msAcquireLockFunction · 0.85
msReleaseLockFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected