Loading lib/share.c +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ #define CURL_SHARE_GET(__handle) (((struct SessionHandle *) (__handle))->share) curl_share * CURLSH * curl_share_init (void) { curl_share *share = (curl_share *) malloc (sizeof (curl_share)); Loading lib/share.h +13 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,19 @@ typedef enum { SHARE_ERROR_LAST } Curl_share_error; Curl_share_error Curl_share_aquire_lock (CURL *, curl_lock_type); Curl_share_error Curl_share_release_lock (CURL *, curl_lock_type); /* this struct is libcurl-private, don't export details */ struct Curl_share { unsigned int specifier; unsigned int locked; unsigned int dirty; curl_lock_function lockfunc; curl_unlock_function unlockfunc; void *clientdata; }; Curl_share_error Curl_share_aquire_lock (CURL *, curl_lock_data); Curl_share_error Curl_share_release_lock (CURL *, curl_lock_data); #endif /* __CURL_SHARE_H */ Loading lib/url.c +3 −2 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ #include "strequal.h" #include "escape.h" #include "strtok.h" #include "share.h" /* And now for the protocols */ #include "ftp.h" Loading Loading @@ -1071,8 +1072,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) case CURLOPT_SHARE: { curl_share *set; set = va_arg(param, curl_share *); struct Curl_share *set; set = va_arg(param, struct Curl_share *); if(data->share) data->share->dirty--; Loading lib/urldata.h +1 −1 Original line number Diff line number Diff line Loading @@ -765,7 +765,7 @@ struct UserDefined { struct SessionHandle { curl_hash *hostcache; curl_share *share; /* Share, handles global variable mutexing */ struct Curl_share *share; /* Share, handles global variable mutexing */ struct UserDefined set; /* values set by the libcurl user */ struct DynamicStatic change; /* possibly modified userdefined data */ Loading Loading
lib/share.c +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ #define CURL_SHARE_GET(__handle) (((struct SessionHandle *) (__handle))->share) curl_share * CURLSH * curl_share_init (void) { curl_share *share = (curl_share *) malloc (sizeof (curl_share)); Loading
lib/share.h +13 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,19 @@ typedef enum { SHARE_ERROR_LAST } Curl_share_error; Curl_share_error Curl_share_aquire_lock (CURL *, curl_lock_type); Curl_share_error Curl_share_release_lock (CURL *, curl_lock_type); /* this struct is libcurl-private, don't export details */ struct Curl_share { unsigned int specifier; unsigned int locked; unsigned int dirty; curl_lock_function lockfunc; curl_unlock_function unlockfunc; void *clientdata; }; Curl_share_error Curl_share_aquire_lock (CURL *, curl_lock_data); Curl_share_error Curl_share_release_lock (CURL *, curl_lock_data); #endif /* __CURL_SHARE_H */ Loading
lib/url.c +3 −2 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ #include "strequal.h" #include "escape.h" #include "strtok.h" #include "share.h" /* And now for the protocols */ #include "ftp.h" Loading Loading @@ -1071,8 +1072,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) case CURLOPT_SHARE: { curl_share *set; set = va_arg(param, curl_share *); struct Curl_share *set; set = va_arg(param, struct Curl_share *); if(data->share) data->share->dirty--; Loading
lib/urldata.h +1 −1 Original line number Diff line number Diff line Loading @@ -765,7 +765,7 @@ struct UserDefined { struct SessionHandle { curl_hash *hostcache; curl_share *share; /* Share, handles global variable mutexing */ struct Curl_share *share; /* Share, handles global variable mutexing */ struct UserDefined set; /* values set by the libcurl user */ struct DynamicStatic change; /* possibly modified userdefined data */ Loading