mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
test1554: improve the error handling
This commit is contained in:
parent
593dcc553a
commit
481539e902
@ -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…
Reference in New Issue
Block a user