1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

updated to use the modified share-types

This commit is contained in:
Daniel Stenberg 2003-01-08 15:50:52 +00:00
parent abcc5c5a82
commit 9a239edb52
4 changed files with 18 additions and 6 deletions

View File

@ -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));

View File

@ -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 */

View File

@ -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--;

View File

@ -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 */