• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/curl/curl-7.36.0/lib/

Lines Matching defs: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;
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)
91 if(!share->sslsession) {
92 share->max_ssl_sessions = 8;
93 share->sslsession = calloc(share->max_ssl_sessions,
95 share->sessionage = 0;
96 if(!share->sslsession)
113 /* this is a type this share will no longer share */
115 share->specifier &= ~(1<<type);
118 if(share->hostcache) {
119 Curl_hash_destroy(share->hostcache);
120 share->hostcache = NULL;
126 if(share->cookies) {
127 Curl_cookie_cleanup(share->cookies);
128 share->cookies = NULL;
137 Curl_safefree(share->sslsession);
154 share->lockfunc = lockfunc;
159 share->unlockfunc = unlockfunc;
164 share->clientdata = ptr;
180 struct Curl_share *share = (struct Curl_share *)sh;
182 if(share == NULL)
185 if(share->lockfunc)
186 share->lockfunc(NULL, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE,
187 share->clientdata);
189 if(share->dirty) {
190 if(share->unlockfunc)
191 share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
195 if(share->hostcache) {
196 Curl_hash_destroy(share->hostcache);
197 share->hostcache = NULL;
201 if(share->cookies)
202 Curl_cookie_cleanup(share->cookies);
206 if(share->sslsession) {
208 for(i = 0; i < share->max_ssl_sessions; i++)
209 Curl_ssl_kill_session(&(share->sslsession[i]));
210 free(share->sslsession);
214 if(share->unlockfunc)
215 share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
216 free(share);
226 struct Curl_share *share = data->share;
228 if(share == NULL)
231 if(share->specifier & (1<<type)) {
232 if(share->lockfunc) /* only call this if set! */
233 share->lockfunc(data, type, accesstype, share->clientdata);
235 /* else if we don't share this, pretend successful lock */
243 struct Curl_share *share = data->share;
245 if(share == NULL)
248 if(share->specifier & (1<<type)) {
249 if(share->unlockfunc) /* only call this if set! */
250 share->unlockfunc (data, type, share->clientdata);