updated to use the modified share-types
This commit is contained in:
parent
abcc5c5a82
commit
9a239edb52
@ -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));
|
||||
|
15
lib/share.h
15
lib/share.h
@ -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 */
|
||||
|
||||
|
@ -101,6 +101,7 @@
|
||||
#include "strequal.h"
|
||||
#include "escape.h"
|
||||
#include "strtok.h"
|
||||
#include "share.h"
|
||||
|
||||
/* And now for the protocols */
|
||||
#include "ftp.h"
|
||||
@ -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--;
|
||||
|
||||
|
@ -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…
Reference in New Issue
Block a user