mirror of
https://github.com/curl/curl.git
synced 2026-07-07 01:37:15 +03:00
test1554: improve the error handling
This commit is contained in:
parent
593dcc553a
commit
481539e902
1 changed files with 6 additions and 0 deletions
|
|
@ -51,6 +51,12 @@ int test(char *URL)
|
|||
global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
share = curl_share_init();
|
||||
if(!share) {
|
||||
fprintf(stderr, "curl_share_init() failed\n");
|
||||
curl_global_cleanup();
|
||||
return TEST_ERR_MAJOR_BAD;
|
||||
}
|
||||
|
||||
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
|
||||
curl_share_setopt(share, CURLSHOPT_LOCKFUNC, my_lock);
|
||||
curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, my_unlock);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue