Lines Matching refs:data
69 struct SessionHandle *data);
105 static void mstate(struct SessionHandle *data, CURLMstate state in mstate() argument
111 CURLMstate oldstate = data->mstate; in mstate()
121 data->mstate = state; in mstate()
124 if(data->mstate >= CURLM_STATE_CONNECT_PEND && in mstate()
125 data->mstate < CURLM_STATE_COMPLETED) { in mstate()
128 if(data->easy_conn) in mstate()
129 connection_id = data->easy_conn->connection_id; in mstate()
131 infof(data, in mstate()
133 statename[oldstate], statename[data->mstate], in mstate()
134 (void *)data, lineno, connection_id); in mstate()
140 data->multi->num_alive--; in mstate()
167 struct SessionHandle *data) in sh_addentry() argument
182 check->easy = data; in sh_addentry()
350 struct SessionHandle *data = (struct SessionHandle *)easy_handle; in curl_multi_add_handle() local
362 if(data->multi) in curl_multi_add_handle()
378 data->state.timeoutlist = timeoutlist; in curl_multi_add_handle()
382 multistate(data, CURLM_STATE_INIT); in curl_multi_add_handle()
384 if((data->set.global_dns_cache) && in curl_multi_add_handle()
385 (data->dns.hostcachetype != HCACHE_GLOBAL)) { in curl_multi_add_handle()
390 data->dns.hostcache = global; in curl_multi_add_handle()
391 data->dns.hostcachetype = HCACHE_GLOBAL; in curl_multi_add_handle()
396 else if(!data->dns.hostcache || in curl_multi_add_handle()
397 (data->dns.hostcachetype == HCACHE_NONE)) { in curl_multi_add_handle()
398 data->dns.hostcache = &multi->hostcache; in curl_multi_add_handle()
399 data->dns.hostcachetype = HCACHE_MULTI; in curl_multi_add_handle()
403 data->state.conn_cache = &multi->conn_cache; in curl_multi_add_handle()
405 if(data->set.httpreq == HTTPREQ_PUT) in curl_multi_add_handle()
406 data->state.infilesize = data->set.filesize; in curl_multi_add_handle()
408 data->state.infilesize = data->set.postfieldsize; in curl_multi_add_handle()
416 data->next = NULL; /* end of the line */ in curl_multi_add_handle()
419 last->next = data; in curl_multi_add_handle()
420 data->prev = last; in curl_multi_add_handle()
421 multi->easylp = data; /* the new last node */ in curl_multi_add_handle()
425 data->prev = NULL; in curl_multi_add_handle()
426 multi->easylp = multi->easyp = data; /* both first and last */ in curl_multi_add_handle()
430 data->multi = multi_handle; in curl_multi_add_handle()
438 Curl_expire(data, 1); in curl_multi_add_handle()
474 (void *)sh->data, sh->data->magic, (int)sh->socket);
483 struct SessionHandle *data = easy; in curl_multi_remove_handle() local
497 if(!data->multi) in curl_multi_remove_handle()
500 premature = (data->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE; in curl_multi_remove_handle()
501 easy_owns_conn = (data->easy_conn && (data->easy_conn->data == easy)) ? in curl_multi_remove_handle()
516 if(data->easy_conn && in curl_multi_remove_handle()
517 data->mstate > CURLM_STATE_DO && in curl_multi_remove_handle()
518 data->mstate < CURLM_STATE_COMPLETED) { in curl_multi_remove_handle()
522 connclose(data->easy_conn, "Removed with partial response"); in curl_multi_remove_handle()
525 data->easy_conn->data = easy; in curl_multi_remove_handle()
532 Curl_expire(data, 0); in curl_multi_remove_handle()
535 if(data->state.timeoutlist) { in curl_multi_remove_handle()
536 Curl_llist_destroy(data->state.timeoutlist, NULL); in curl_multi_remove_handle()
537 data->state.timeoutlist = NULL; in curl_multi_remove_handle()
540 if(data->dns.hostcachetype == HCACHE_MULTI) { in curl_multi_remove_handle()
542 data->dns.hostcache = NULL; in curl_multi_remove_handle()
543 data->dns.hostcachetype = HCACHE_NONE; in curl_multi_remove_handle()
546 if(data->easy_conn) { in curl_multi_remove_handle()
557 (void)Curl_done(&data->easy_conn, data->result, premature); in curl_multi_remove_handle()
561 Curl_getoff_all_pipelines(data, data->easy_conn); in curl_multi_remove_handle()
564 Curl_wildcard_dtor(&data->wildcard); in curl_multi_remove_handle()
568 data->state.conn_cache = NULL; in curl_multi_remove_handle()
572 data->mstate = CURLM_STATE_COMPLETED; in curl_multi_remove_handle()
577 if(data->easy_conn) { in curl_multi_remove_handle()
578 data->easy_conn->data = NULL; in curl_multi_remove_handle()
579 data->easy_conn = NULL; in curl_multi_remove_handle()
582 data->multi = NULL; /* clear the association to this multi handle */ in curl_multi_remove_handle()
598 if(data->prev) in curl_multi_remove_handle()
599 data->prev->next = data->next; in curl_multi_remove_handle()
601 multi->easyp = data->next; /* point to first node */ in curl_multi_remove_handle()
604 if(data->next) in curl_multi_remove_handle()
605 data->next->prev = data->prev; in curl_multi_remove_handle()
607 multi->easylp = data->prev; /* point to last node */ in curl_multi_remove_handle()
623 void Curl_multi_handlePipeBreak(struct SessionHandle *data) in Curl_multi_handlePipeBreak() argument
625 data->easy_conn = NULL; in Curl_multi_handlePipeBreak()
676 static int multi_getsock(struct SessionHandle *data, in multi_getsock() argument
686 if(data->state.pipe_broke || !data->easy_conn) in multi_getsock()
689 if(data->mstate > CURLM_STATE_CONNECT && in multi_getsock()
690 data->mstate < CURLM_STATE_COMPLETED) { in multi_getsock()
692 data->easy_conn->data = data; in multi_getsock()
695 switch(data->mstate) { in multi_getsock()
713 return Curl_resolver_getsock(data->easy_conn, socks, numsocks); in multi_getsock()
717 return Curl_protocol_getsock(data->easy_conn, socks, numsocks); in multi_getsock()
721 return Curl_doing_getsock(data->easy_conn, socks, numsocks); in multi_getsock()
724 return waitproxyconnect_getsock(data->easy_conn, socks, numsocks); in multi_getsock()
727 return waitconnect_getsock(data->easy_conn, socks, numsocks); in multi_getsock()
730 return domore_getsock(data->easy_conn, socks, numsocks); in multi_getsock()
737 return Curl_single_getsock(data->easy_conn, socks, numsocks); in multi_getsock()
750 struct SessionHandle *data; in curl_multi_fdset() local
760 data=multi->easyp; in curl_multi_fdset()
761 while(data) { in curl_multi_fdset()
762 bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); in curl_multi_fdset()
784 data = data->next; /* check next handle */ in curl_multi_fdset()
799 struct SessionHandle *data; in curl_multi_wait() local
819 data=multi->easyp; in curl_multi_wait()
820 while(data) { in curl_multi_wait()
821 bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); in curl_multi_wait()
839 data = data->next; /* check next handle */ in curl_multi_wait()
857 data=multi->easyp; in curl_multi_wait()
858 while(data) { in curl_multi_wait()
859 bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); in curl_multi_wait()
881 data = data->next; /* check next handle */ in curl_multi_wait()
900 infof(data, "Curl_poll(%d ds, %d ms)\n", nfds, timeout_ms); in curl_multi_wait()
962 struct SessionHandle *data) in multi_runsingle() argument
976 if(!GOOD_EASY_HANDLE(data)) in multi_runsingle()
985 if(data->state.pipe_broke) { in multi_runsingle()
986 infof(data, "Pipe broke: handle %p, url = %s\n", in multi_runsingle()
987 (void *)data, data->state.path); in multi_runsingle()
989 if(data->mstate < CURLM_STATE_COMPLETED) { in multi_runsingle()
991 multistate(data, CURLM_STATE_CONNECT); in multi_runsingle()
996 data->state.pipe_broke = FALSE; in multi_runsingle()
997 data->easy_conn = NULL; in multi_runsingle()
1001 if(!data->easy_conn && in multi_runsingle()
1002 data->mstate > CURLM_STATE_CONNECT && in multi_runsingle()
1003 data->mstate < CURLM_STATE_DONE) { in multi_runsingle()
1007 failf(data, "In state %d with no easy_conn, bail out!\n", data->mstate); in multi_runsingle()
1012 DEBUGF(infof(data, "multi changed, check CONNECT_PEND queue!\n")); in multi_runsingle()
1016 if(data->easy_conn && data->mstate > CURLM_STATE_CONNECT && in multi_runsingle()
1017 data->mstate < CURLM_STATE_COMPLETED) in multi_runsingle()
1019 data->easy_conn->data = data; in multi_runsingle()
1021 if(data->easy_conn && in multi_runsingle()
1022 (data->mstate >= CURLM_STATE_CONNECT) && in multi_runsingle()
1023 (data->mstate < CURLM_STATE_COMPLETED)) { in multi_runsingle()
1027 timeout_ms = Curl_timeleft(data, &now, in multi_runsingle()
1028 (data->mstate <= CURLM_STATE_WAITDO)? in multi_runsingle()
1033 if(data->mstate == CURLM_STATE_WAITRESOLVE) in multi_runsingle()
1034 failf(data, "Resolving timed out after %ld milliseconds", in multi_runsingle()
1035 Curl_tvdiff(now, data->progress.t_startsingle)); in multi_runsingle()
1036 else if(data->mstate == CURLM_STATE_WAITCONNECT) in multi_runsingle()
1037 failf(data, "Connection timed out after %ld milliseconds", in multi_runsingle()
1038 Curl_tvdiff(now, data->progress.t_startsingle)); in multi_runsingle()
1040 k = &data->req; in multi_runsingle()
1042 failf(data, "Operation timed out after %ld milliseconds with %" in multi_runsingle()
1045 Curl_tvdiff(k->now, data->progress.t_startsingle), in multi_runsingle()
1049 failf(data, "Operation timed out after %ld milliseconds with %" in multi_runsingle()
1051 Curl_tvdiff(now, data->progress.t_startsingle), in multi_runsingle()
1057 if(data->mstate > CURLM_STATE_DO) { in multi_runsingle()
1058 connclose(data->easy_conn, "Disconnected with pending data"); in multi_runsingle()
1062 (void)Curl_done(&data->easy_conn, result, TRUE); in multi_runsingle()
1068 switch(data->mstate) { in multi_runsingle()
1071 result=Curl_pretransfer(data); in multi_runsingle()
1075 multistate(data, CURLM_STATE_CONNECT); in multi_runsingle()
1076 Curl_pgrsTime(data, TIMER_STARTOP); in multi_runsingle()
1088 Curl_pgrsTime(data, TIMER_STARTSINGLE); in multi_runsingle()
1089 result = Curl_connect(data, &data->easy_conn, in multi_runsingle()
1094 multistate(data, CURLM_STATE_CONNECT_PEND); in multi_runsingle()
1097 if(!Curl_llist_insert_next(multi->pending, multi->pending->tail, data)) in multi_runsingle()
1106 result = Curl_add_handle_to_pipeline(data, data->easy_conn); in multi_runsingle()
1112 multistate(data, CURLM_STATE_WAITRESOLVE); in multi_runsingle()
1120 multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)? in multi_runsingle()
1124 if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) in multi_runsingle()
1125 multistate(data, CURLM_STATE_WAITPROXYCONNECT); in multi_runsingle()
1128 multistate(data, CURLM_STATE_WAITCONNECT); in multi_runsingle()
1139 struct connectdata *conn = data->easy_conn; in multi_runsingle()
1150 infof(data, "Hostname was found in DNS cache\n"); in multi_runsingle()
1154 result = Curl_resolver_is_resolved(data->easy_conn, &dns); in multi_runsingle()
1162 singlesocket(multi, data); in multi_runsingle()
1167 result = Curl_async_resolved(data->easy_conn, &protocol_connect); in multi_runsingle()
1172 data->easy_conn = NULL; /* no more connection */ in multi_runsingle()
1177 multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)? in multi_runsingle()
1181 if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) in multi_runsingle()
1182 multistate(data, CURLM_STATE_WAITPROXYCONNECT); in multi_runsingle()
1185 multistate(data, CURLM_STATE_WAITCONNECT); in multi_runsingle()
1201 result = Curl_http_connect(data->easy_conn, &protocol_connect); in multi_runsingle()
1204 if(data->easy_conn->bits.proxy_connect_closed) { in multi_runsingle()
1207 Curl_done(&data->easy_conn, CURLE_OK, FALSE); in multi_runsingle()
1208 multistate(data, CURLM_STATE_CONNECT); in multi_runsingle()
1211 if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_COMPLETE) in multi_runsingle()
1213 multistate(data, CURLM_STATE_SENDPROTOCONNECT); in multi_runsingle()
1220 result = Curl_is_connected(data->easy_conn, FIRSTSOCKET, &connected); in multi_runsingle()
1223 multistate(data, data->easy_conn->bits.tunnel_proxy? in multi_runsingle()
1236 result = Curl_protocol_connect(data->easy_conn, &protocol_connect); in multi_runsingle()
1239 multistate(data, CURLM_STATE_PROTOCONNECT); in multi_runsingle()
1242 multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)? in multi_runsingle()
1248 Curl_posttransfer(data); in multi_runsingle()
1249 Curl_done(&data->easy_conn, result, TRUE); in multi_runsingle()
1256 result = Curl_protocol_connecting(data->easy_conn, &protocol_connect); in multi_runsingle()
1259 multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)? in multi_runsingle()
1265 Curl_posttransfer(data); in multi_runsingle()
1266 Curl_done(&data->easy_conn, result, TRUE); in multi_runsingle()
1273 if(Curl_pipeline_checkget_write(data, data->easy_conn)) { in multi_runsingle()
1275 multistate(data, CURLM_STATE_DO); in multi_runsingle()
1281 if(data->set.connect_only) { in multi_runsingle()
1283 connkeep(data->easy_conn, "CONNECT_ONLY"); in multi_runsingle()
1284 multistate(data, CURLM_STATE_DONE); in multi_runsingle()
1290 result = Curl_do(&data->easy_conn, &dophase_done); in multi_runsingle()
1297 if(data->set.wildcardmatch) { in multi_runsingle()
1298 struct WildcardData *wc = &data->wildcard; in multi_runsingle()
1301 Curl_done(&data->easy_conn, CURLE_OK, FALSE); in multi_runsingle()
1302 multistate(data, CURLM_STATE_DONE); in multi_runsingle()
1309 multistate(data, CURLM_STATE_DOING); in multi_runsingle()
1314 else if(data->easy_conn->bits.do_more) { in multi_runsingle()
1317 multistate(data, CURLM_STATE_DO_MORE); in multi_runsingle()
1322 multistate(data, CURLM_STATE_DO_DONE); in multi_runsingle()
1327 data->easy_conn->bits.reuse) { in multi_runsingle()
1338 drc = Curl_retry_request(data->easy_conn, &newurl); in multi_runsingle()
1347 Curl_posttransfer(data); in multi_runsingle()
1348 drc = Curl_done(&data->easy_conn, result, FALSE); in multi_runsingle()
1355 drc = Curl_follow(data, newurl, follow); in multi_runsingle()
1357 multistate(data, CURLM_STATE_CONNECT); in multi_runsingle()
1381 Curl_posttransfer(data); in multi_runsingle()
1382 if(data->easy_conn) in multi_runsingle()
1383 Curl_done(&data->easy_conn, result, FALSE); in multi_runsingle()
1391 result = Curl_protocol_doing(data->easy_conn, in multi_runsingle()
1396 multistate(data, data->easy_conn->bits.do_more? in multi_runsingle()
1404 Curl_posttransfer(data); in multi_runsingle()
1405 Curl_done(&data->easy_conn, result, FALSE); in multi_runsingle()
1414 result = Curl_do_more(data->easy_conn, &control); in multi_runsingle()
1422 multistate(data, control==1? in multi_runsingle()
1433 Curl_posttransfer(data); in multi_runsingle()
1434 Curl_done(&data->easy_conn, result, FALSE); in multi_runsingle()
1441 Curl_move_handle_from_send_to_recv_pipe(data, data->easy_conn); in multi_runsingle()
1447 if((data->easy_conn->sockfd != CURL_SOCKET_BAD) || in multi_runsingle()
1448 (data->easy_conn->writesockfd != CURL_SOCKET_BAD)) in multi_runsingle()
1449 multistate(data, CURLM_STATE_WAITPERFORM); in multi_runsingle()
1451 multistate(data, CURLM_STATE_DONE); in multi_runsingle()
1457 if(Curl_pipeline_checkget_read(data, data->easy_conn)) { in multi_runsingle()
1459 multistate(data, CURLM_STATE_PERFORM); in multi_runsingle()
1466 if(Curl_pgrsUpdate(data->easy_conn)) in multi_runsingle()
1469 result = Curl_speedcheck(data, now); in multi_runsingle()
1471 if(( (data->set.max_send_speed == 0) || in multi_runsingle()
1472 (data->progress.ulspeed < data->set.max_send_speed )) && in multi_runsingle()
1473 ( (data->set.max_recv_speed == 0) || in multi_runsingle()
1474 (data->progress.dlspeed < data->set.max_recv_speed))) in multi_runsingle()
1475 multistate(data, CURLM_STATE_PERFORM); in multi_runsingle()
1484 if((data->set.max_send_speed > 0) && in multi_runsingle()
1485 (data->progress.ulspeed > data->set.max_send_speed)) { in multi_runsingle()
1488 multistate(data, CURLM_STATE_TOOFAST); in multi_runsingle()
1491 buffersize = (int)(data->set.buffer_size ? in multi_runsingle()
1492 data->set.buffer_size : BUFSIZE); in multi_runsingle()
1493 timeout_ms = Curl_sleep_time(data->set.max_send_speed, in multi_runsingle()
1494 data->progress.ulspeed, buffersize); in multi_runsingle()
1495 Curl_expire_latest(data, timeout_ms); in multi_runsingle()
1500 if((data->set.max_recv_speed > 0) && in multi_runsingle()
1501 (data->progress.dlspeed > data->set.max_recv_speed)) { in multi_runsingle()
1504 multistate(data, CURLM_STATE_TOOFAST); in multi_runsingle()
1507 buffersize = (int)(data->set.buffer_size ? in multi_runsingle()
1508 data->set.buffer_size : BUFSIZE); in multi_runsingle()
1509 timeout_ms = Curl_sleep_time(data->set.max_recv_speed, in multi_runsingle()
1510 data->progress.dlspeed, buffersize); in multi_runsingle()
1511 Curl_expire_latest(data, timeout_ms); in multi_runsingle()
1516 result = Curl_readwrite(data->easy_conn, data, &done); in multi_runsingle()
1518 k = &data->req; in multi_runsingle()
1522 Curl_pipeline_leave_read(data->easy_conn); in multi_runsingle()
1526 Curl_pipeline_leave_write(data->easy_conn); in multi_runsingle()
1533 CURLcode ret = Curl_retry_request(data->easy_conn, &newurl); in multi_runsingle()
1554 if(!(data->easy_conn->handler->flags & PROTOPT_DUAL)) in multi_runsingle()
1555 connclose(data->easy_conn, "Transfer returned error"); in multi_runsingle()
1557 Curl_posttransfer(data); in multi_runsingle()
1558 Curl_done(&data->easy_conn, result, FALSE); in multi_runsingle()
1564 Curl_posttransfer(data); in multi_runsingle()
1567 Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); in multi_runsingle()
1570 if(data->easy_conn->recv_pipe->head) in multi_runsingle()
1571 Curl_expire_latest(data->easy_conn->recv_pipe->head->ptr, 1); in multi_runsingle()
1578 if(data->req.newurl || retry) { in multi_runsingle()
1583 newurl = data->req.newurl; in multi_runsingle()
1584 data->req.newurl = NULL; in multi_runsingle()
1589 result = Curl_done(&data->easy_conn, CURLE_OK, FALSE); in multi_runsingle()
1591 result = Curl_follow(data, newurl, follow); in multi_runsingle()
1593 multistate(data, CURLM_STATE_CONNECT); in multi_runsingle()
1606 if(data->req.location) { in multi_runsingle()
1608 newurl = data->req.location; in multi_runsingle()
1609 data->req.location = NULL; in multi_runsingle()
1610 result = Curl_follow(data, newurl, FOLLOW_FAKE); in multi_runsingle()
1617 multistate(data, CURLM_STATE_DONE); in multi_runsingle()
1630 if(data->easy_conn) { in multi_runsingle()
1634 Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); in multi_runsingle()
1639 res = Curl_done(&data->easy_conn, result, FALSE); in multi_runsingle()
1651 if(data->easy_conn) in multi_runsingle()
1652 data->easy_conn = NULL; in multi_runsingle()
1655 if(data->set.wildcardmatch) { in multi_runsingle()
1656 if(data->wildcard.state != CURLWC_DONE) { in multi_runsingle()
1659 multistate(data, CURLM_STATE_INIT); in multi_runsingle()
1666 multistate(data, CURLM_STATE_COMPLETED); in multi_runsingle()
1677 data->easy_conn = NULL; in multi_runsingle()
1679 Curl_expire(data, 0); /* stop all timers */ in multi_runsingle()
1683 data->result = result; in multi_runsingle()
1691 if(data->mstate < CURLM_STATE_COMPLETED) { in multi_runsingle()
1701 data->state.pipe_broke = FALSE; in multi_runsingle()
1706 if(data->easy_conn) { in multi_runsingle()
1708 Curl_pipeline_leave_write(data->easy_conn); in multi_runsingle()
1709 Curl_pipeline_leave_read(data->easy_conn); in multi_runsingle()
1710 Curl_removeHandleFromPipeline(data, data->easy_conn->send_pipe); in multi_runsingle()
1711 Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); in multi_runsingle()
1717 Curl_disconnect(data->easy_conn, dead_connection); in multi_runsingle()
1722 data->easy_conn = NULL; in multi_runsingle()
1725 else if(data->mstate == CURLM_STATE_CONNECT) { in multi_runsingle()
1727 (void)Curl_posttransfer(data); in multi_runsingle()
1730 multistate(data, CURLM_STATE_COMPLETED); in multi_runsingle()
1733 else if(data->easy_conn && Curl_pgrsUpdate(data->easy_conn)) { in multi_runsingle()
1737 connclose(data->easy_conn, "Aborted by callback"); in multi_runsingle()
1740 multistate(data, (data->mstate < CURLM_STATE_DONE)? in multi_runsingle()
1746 if(CURLM_STATE_COMPLETED == data->mstate) { in multi_runsingle()
1748 msg = &data->msg; in multi_runsingle()
1751 msg->extmsg.easy_handle = data; in multi_runsingle()
1752 msg->extmsg.data.result = result; in multi_runsingle()
1756 multistate(data, CURLM_STATE_MSGSENT); in multi_runsingle()
1760 data->result = result; in multi_runsingle()
1770 struct SessionHandle *data; in curl_multi_perform() local
1778 data=multi->easyp; in curl_multi_perform()
1779 while(data) { in curl_multi_perform()
1781 struct WildcardData *wc = &data->wildcard; in curl_multi_perform()
1784 if(data->set.wildcardmatch) { in curl_multi_perform()
1792 sigpipe_ignore(data, &pipe_st); in curl_multi_perform()
1793 result = multi_runsingle(multi, now, data); in curl_multi_perform()
1796 if(data->set.wildcardmatch) { in curl_multi_perform()
1805 data = data->next; /* operate on next handle */ in curl_multi_perform()
1841 conn->data = multi->closure_handle; in close_all_connections()
1843 sigpipe_ignore(conn->data, &pipe_st); in close_all_connections()
1855 struct SessionHandle *data; in curl_multi_cleanup() local
1884 data = multi->easyp; in curl_multi_cleanup()
1885 while(data) { in curl_multi_cleanup()
1886 nextdata=data->next; in curl_multi_cleanup()
1887 if(data->dns.hostcachetype == HCACHE_MULTI) { in curl_multi_cleanup()
1889 Curl_hostcache_clean(data, data->dns.hostcache); in curl_multi_cleanup()
1890 data->dns.hostcache = NULL; in curl_multi_cleanup()
1891 data->dns.hostcachetype = HCACHE_NONE; in curl_multi_cleanup()
1895 data->state.conn_cache = NULL; in curl_multi_cleanup()
1896 data->multi = NULL; /* clear the association */ in curl_multi_cleanup()
1898 data = nextdata; in curl_multi_cleanup()
1960 struct SessionHandle *data) in singlesocket() argument
1975 curraction = multi_getsock(data, socks, MAX_SOCKSPEREASYHANDLE); in singlesocket()
2005 entry = sh_addentry(&multi->sockhash, s, data); in singlesocket()
2013 multi->socket_cb(data, in singlesocket()
2026 for(i=0; i< data->numsocks; i++) { in singlesocket()
2028 s = data->sockets[i]; in singlesocket()
2046 struct connectdata *easy_conn = data->easy_conn; in singlesocket()
2055 if(entry->easy == data) { in singlesocket()
2056 if(Curl_recvpipe_head(data, easy_conn)) in singlesocket()
2069 if(entry->easy == data) { in singlesocket()
2070 if(Curl_sendpipe_head(data, easy_conn)) in singlesocket()
2091 multi->socket_cb(data, in singlesocket()
2102 memcpy(data->sockets, socks, num*sizeof(curl_socket_t)); in singlesocket()
2103 data->numsocks = num; in singlesocket()
2118 struct Curl_multi *multi = conn->data->multi; in Curl_multi_closed()
2127 multi->socket_cb(conn->data, s, CURL_POLL_REMOVE, in Curl_multi_closed()
2201 struct SessionHandle *data = NULL; in multi_socket() local
2212 data=multi->easyp; in multi_socket()
2213 while(data) { in multi_socket()
2214 singlesocket(multi, data); in multi_socket()
2215 data = data->next; in multi_socket()
2237 data = entry->easy; in multi_socket()
2239 if(data->magic != CURLEASY_MAGIC_NUMBER) in multi_socket()
2246 if(data->easy_conn) { in multi_socket()
2248 data->easy_conn->send_pipe && in multi_socket()
2249 data->easy_conn->send_pipe->head) in multi_socket()
2250 data = data->easy_conn->send_pipe->head->ptr; in multi_socket()
2252 data->easy_conn->recv_pipe && in multi_socket()
2253 data->easy_conn->recv_pipe->head) in multi_socket()
2254 data = data->easy_conn->recv_pipe->head->ptr; in multi_socket()
2257 if(data->easy_conn && in multi_socket()
2258 !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK)) in multi_socket()
2260 data->easy_conn->cselect_bits = ev_bitmask; in multi_socket()
2262 sigpipe_ignore(data, &pipe_st); in multi_socket()
2263 result = multi_runsingle(multi, now, data); in multi_socket()
2266 if(data->easy_conn && in multi_socket()
2267 !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK)) in multi_socket()
2269 data->easy_conn->cselect_bits = 0; in multi_socket()
2274 singlesocket(multi, data); in multi_socket()
2280 data = NULL; /* set data to NULL again to avoid calling in multi_socket()
2301 if(data) { in multi_socket()
2304 sigpipe_ignore(data, &pipe_st); in multi_socket()
2305 result = multi_runsingle(multi, now, data); in multi_socket()
2311 singlesocket(multi, data); in multi_socket()
2319 data = t->payload; /* assign this for next loop */ in multi_socket()
2577 void Curl_expire(struct SessionHandle *data, long milli) in Curl_expire() argument
2579 struct Curl_multi *multi = data->multi; in Curl_expire()
2580 struct timeval *nowp = &data->state.expiretime; in Curl_expire()
2593 struct curl_llist *list = data->state.timeoutlist; in Curl_expire()
2596 &data->state.timenode, in Curl_expire()
2599 infof(data, "Internal error clearing splay node = %d\n", rc); in Curl_expire()
2606 infof(data, "Expire cleared\n"); in Curl_expire()
2632 multi_addtimeout(data->state.timeoutlist, &set); in Curl_expire()
2638 multi_addtimeout(data->state.timeoutlist, nowp); in Curl_expire()
2643 &data->state.timenode, in Curl_expire()
2646 infof(data, "Internal error removing splay node = %d\n", rc); in Curl_expire()
2650 data->state.timenode.payload = data; in Curl_expire()
2653 &data->state.timenode); in Curl_expire()
2671 void Curl_expire_latest(struct SessionHandle *data, long milli) in Curl_expire_latest() argument
2673 struct timeval *expire = &data->state.expiretime; in Curl_expire_latest()
2697 Curl_expire(data, milli); in Curl_expire_latest()
2753 struct SessionHandle *data = e->ptr; in Curl_multi_process_pending_handles() local
2756 if(data->mstate == CURLM_STATE_CONNECT_PEND) { in Curl_multi_process_pending_handles()
2757 multistate(data, CURLM_STATE_CONNECT); in Curl_multi_process_pending_handles()
2763 Curl_expire_latest(data, 1); in Curl_multi_process_pending_handles()
2774 struct SessionHandle *data; in Curl_multi_dump() local
2778 for(data=multi->easyp; data; data = data->next) { in Curl_multi_dump()
2779 if(data->mstate < CURLM_STATE_COMPLETED) { in Curl_multi_dump()
2782 (void *)data, in Curl_multi_dump()
2783 statename[data->mstate], data->numsocks); in Curl_multi_dump()
2784 for(i=0; i < data->numsocks; i++) { in Curl_multi_dump()
2785 curl_socket_t s = data->sockets[i]; in Curl_multi_dump()
2798 if(data->numsocks) in Curl_multi_dump()