• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/curl-7.23.1/lib/

Lines Matching refs:share

27 #include "share.h"
37 struct Curl_share *share = calloc(1, sizeof(struct Curl_share));
38 if(share)
39 share->specifier |= (1<<CURL_LOCK_DATA_SHARE);
41 return share;
48 struct Curl_share *share = (struct Curl_share *)sh;
55 if(share->dirty)
57 using this share */
64 /* this is a type this share will share */
66 share->specifier |= (1<<type);
69 if(!share->hostcache) {
70 share->hostcache = Curl_mk_dnscache();
71 if(!share->hostcache)
78 if(!share->cookies) {
79 share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE );
80 if(!share->cookies)
90 if(!share->sslsession) {
91 share->nsslsession = 8;
92 share->sslsession = calloc(share->nsslsession,
94 if(!share->sslsession)
110 /* this is a type this share will no longer share */
112 share->specifier &= ~(1<<type);
115 if(share->hostcache) {
116 Curl_hash_destroy(share->hostcache);
117 share->hostcache = NULL;
123 if(share->cookies) {
124 Curl_cookie_cleanup(share->cookies);
125 share->cookies = NULL;
134 if(share->sslsession) {
135 free(share->sslsession);
136 share->sslsession = NULL;
137 share->nsslsession = 0;
154 share->lockfunc = lockfunc;
159 share->unlockfunc = unlockfunc;
164 share->clientdata = ptr;
177 struct Curl_share *share = (struct Curl_share *)sh;
179 if(share == NULL)
182 if(share->lockfunc)
183 share->lockfunc(NULL, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE,
184 share->clientdata);
186 if(share->dirty) {
187 if(share->unlockfunc)
188 share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
192 if(share->hostcache) {
193 Curl_hash_destroy(share->hostcache);
194 share->hostcache = NULL;
198 if(share->cookies)
199 Curl_cookie_cleanup(share->cookies);
203 if(share->sslsession) {
205 for(i = 0; i < share->nsslsession; ++i)
206 Curl_ssl_kill_session(&(share->sslsession[i]));
207 free(share->sslsession);
211 if(share->unlockfunc)
212 share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
213 free(share);
223 struct Curl_share *share = data->share;
225 if(share == NULL)
228 if(share->specifier & (1<<type)) {
229 if(share->lockfunc) /* only call this if set! */
230 share->lockfunc(data, type, accesstype, share->clientdata);
232 /* else if we don't share this, pretend successful lock */
240 struct Curl_share *share = data->share;
242 if(share == NULL)
245 if(share->specifier & (1<<type)) {
246 if(share->unlockfunc) /* only call this if set! */
247 share->unlockfunc (data, type, share->clientdata);