Lines Matching refs:ci
325 struct CookieInfo *ci = in Curl_cookie_loadfiles() local
328 if(!ci) in Curl_cookie_loadfiles()
335 data->cookies = ci; in Curl_cookie_loadfiles()
368 static void remove_expired(struct CookieInfo *ci) in remove_expired() argument
382 if(now < ci->next_expiration && in remove_expired()
383 ci->next_expiration != CURL_OFF_T_MAX) in remove_expired()
386 ci->next_expiration = CURL_OFF_T_MAX; in remove_expired()
392 for(n = Curl_llist_head(&ci->cookielist[i]); n; n = e) { in remove_expired()
398 ci->numcookies--; in remove_expired()
405 if(co->expires && co->expires < ci->next_expiration) in remove_expired()
406 ci->next_expiration = co->expires; in remove_expired()
475 struct CookieInfo *ci, in parse_cookie_header() argument
600 if(secure || !ci->running) { in parse_cookie_header()
799 struct CookieInfo *ci, in parse_netscape() argument
888 if(secure || ci->running) in parse_netscape()
984 struct CookieInfo *ci, in replace_existing() argument
992 for(n = Curl_llist_head(&ci->cookielist[myhash]); n; n = Curl_node_next(n)) { in replace_existing()
1097 struct CookieInfo *ci, in Curl_cookie_add() argument
1123 rc = parse_cookie_header(data, co, ci, lineptr, domain, path, secure); in Curl_cookie_add()
1125 rc = parse_netscape(co, ci, lineptr, secure); in Curl_cookie_add()
1145 if(!ci->running && /* read from a file */ in Curl_cookie_add()
1146 ci->newsession && /* clean session cookies */ in Curl_cookie_add()
1150 co->livecookie = ci->running; in Curl_cookie_add()
1151 co->creationtime = ++ci->lastct; in Curl_cookie_add()
1161 remove_expired(ci); in Curl_cookie_add()
1166 if(replace_existing(data, co, ci, secure, &replaces)) in Curl_cookie_add()
1171 Curl_llist_append(&ci->cookielist[myhash], co, &co->node); in Curl_cookie_add()
1173 if(ci->running) in Curl_cookie_add()
1181 ci->numcookies++; /* one more cookie in the jar */ in Curl_cookie_add()
1187 if(co->expires && (co->expires < ci->next_expiration)) in Curl_cookie_add()
1188 ci->next_expiration = co->expires; in Curl_cookie_add()
1213 struct CookieInfo *ci, in Curl_cookie_init() argument
1218 if(!ci) { in Curl_cookie_init()
1222 ci = calloc(1, sizeof(struct CookieInfo)); in Curl_cookie_init()
1223 if(!ci) in Curl_cookie_init()
1229 Curl_llist_init(&ci->cookielist[i], NULL); in Curl_cookie_init()
1234 ci->next_expiration = CURL_OFF_T_MAX; in Curl_cookie_init()
1236 ci->newsession = newsession; /* new session? */ in Curl_cookie_init()
1252 ci->running = FALSE; /* this is not running, this is init */ in Curl_cookie_init()
1267 Curl_cookie_add(data, ci, headerline, TRUE, lineptr, NULL, NULL, TRUE); in Curl_cookie_init()
1275 remove_expired(ci); in Curl_cookie_init()
1282 ci->running = TRUE; /* now, we are running */ in Curl_cookie_init()
1284 return ci; in Curl_cookie_init()
1351 struct CookieInfo *ci, in Curl_cookie_getlist() argument
1363 if(!ci || !Curl_llist_count(&ci->cookielist[myhash])) in Curl_cookie_getlist()
1367 remove_expired(ci); in Curl_cookie_getlist()
1372 for(n = Curl_llist_head(&ci->cookielist[myhash]); in Curl_cookie_getlist()
1454 void Curl_cookie_clearall(struct CookieInfo *ci) in Curl_cookie_clearall() argument
1456 if(ci) { in Curl_cookie_clearall()
1460 for(n = Curl_llist_head(&ci->cookielist[i]); n;) { in Curl_cookie_clearall()
1468 ci->numcookies = 0; in Curl_cookie_clearall()
1477 void Curl_cookie_clearsess(struct CookieInfo *ci) in Curl_cookie_clearsess() argument
1481 if(!ci) in Curl_cookie_clearsess()
1485 struct Curl_llist_node *n = Curl_llist_head(&ci->cookielist[i]); in Curl_cookie_clearsess()
1494 ci->numcookies--; in Curl_cookie_clearsess()
1505 void Curl_cookie_cleanup(struct CookieInfo *ci) in Curl_cookie_cleanup() argument
1507 if(ci) { in Curl_cookie_cleanup()
1508 Curl_cookie_clearall(ci); in Curl_cookie_cleanup()
1509 free(ci); /* free the base struct as well */ in Curl_cookie_cleanup()
1555 struct CookieInfo *ci, in cookie_output() argument
1563 if(!ci) in cookie_output()
1568 remove_expired(ci); in cookie_output()
1586 if(ci->numcookies) { in cookie_output()
1592 array = calloc(1, sizeof(struct Cookie *) * ci->numcookies); in cookie_output()
1600 for(n = Curl_llist_head(&ci->cookielist[i]); n; in cookie_output()