• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/curl-7.21.7/lib/

Lines Matching defs:share

29 #include "share.h"
38 struct Curl_share *share = calloc(1, sizeof(struct Curl_share));
39 if(share)
40 share->specifier |= (1<<CURL_LOCK_DATA_SHARE);
42 return share;
49 struct Curl_share *share = (struct Curl_share *)sh;
56 if(share->dirty)
58 using this share */
65 /* this is a type this share will share */
67 share->specifier |= (1<<type);
70 if(!share->hostcache) {
71 share->hostcache = Curl_mk_dnscache();
72 if(!share->hostcache)
79 if(!share->cookies) {
80 share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE );
81 if(!share->cookies)
96 /* this is a type this share will no longer share */
98 share->specifier &= ~(1<<type);
101 if(share->hostcache) {
102 Curl_hash_destroy(share->hostcache);
103 share->hostcache = NULL;
109 if(share->cookies) {
110 Curl_cookie_cleanup(share->cookies);
111 share->cookies = NULL;
129 share->lockfunc = lockfunc;
134 share->unlockfunc = unlockfunc;
139 share->clientdata = ptr;
152 struct Curl_share *share = (struct Curl_share *)sh;
154 if(share == NULL)
157 if(share->lockfunc)
158 share->lockfunc(NULL, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE,
159 share->clientdata);
161 if(share->dirty) {
162 if(share->unlockfunc)
163 share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
167 if(share->hostcache) {
168 Curl_hash_destroy(share->hostcache);
169 share->hostcache = NULL;
172 if(share->cookies)
173 Curl_cookie_cleanup(share->cookies);
175 if(share->unlockfunc)
176 share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
177 free(share);
187 struct Curl_share *share = data->share;
189 if(share == NULL)
192 if(share->specifier & (1<<type)) {
193 if(share->lockfunc) /* only call this if set! */
194 share->lockfunc(data, type, accesstype, share->clientdata);
196 /* else if we don't share this, pretend successful lock */
204 struct Curl_share *share = data->share;
206 if(share == NULL)
209 if(share->specifier & (1<<type)) {
210 if(share->unlockfunc) /* only call this if set! */
211 share->unlockfunc (data, type, share->clientdata);