Lines Matching refs:conn
92 struct connectdata *conn, bool dead);
94 static int imap_getsock(struct Curl_easy *data, struct connectdata *conn,
98 struct connectdata *conn);
102 static CURLcode imap_parse_url_options(struct connectdata *conn);
195 static void imap_to_imaps(struct connectdata *conn) in imap_to_imaps() argument
198 conn->handler = &Curl_handler_imaps; in imap_to_imaps()
201 conn->bits.tls_upgraded = TRUE; in imap_to_imaps()
255 static bool imap_endofresp(struct Curl_easy *data, struct connectdata *conn, in imap_endofresp() argument
259 struct imap_conn *imapc = &conn->proto.imapc; in imap_endofresp()
360 char *message = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf); in imap_get_message()
361 size_t len = data->conn->proto.imapc.pp.nfinal; in imap_get_message()
394 struct imap_conn *imapc = &data->conn->proto.imapc; in imap_state()
432 struct connectdata *conn) in imap_perform_capability() argument
435 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_capability()
473 struct connectdata *conn) in imap_perform_upgrade_tls() argument
476 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_upgrade_tls()
480 if(!Curl_conn_is_ssl(conn, FIRSTSOCKET)) { in imap_perform_upgrade_tls()
481 result = Curl_ssl_cfilter_add(data, conn, FIRSTSOCKET); in imap_perform_upgrade_tls()
493 imap_to_imaps(conn); in imap_perform_upgrade_tls()
494 result = imap_perform_capability(data, conn); in imap_perform_upgrade_tls()
508 struct connectdata *conn) in imap_perform_login() argument
523 user = imap_atom(conn->user, FALSE); in imap_perform_login()
524 passwd = imap_atom(conn->passwd, FALSE); in imap_perform_login()
575 struct imap_conn *imapc = &data->conn->proto.imapc; in imap_continue_authenticate()
592 struct imap_conn *imapc = &data->conn->proto.imapc; in imap_cancel_authenticate()
608 struct connectdata *conn) in imap_perform_authentication() argument
611 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_authentication()
630 result = imap_perform_login(data, conn); in imap_perform_authentication()
684 struct connectdata *conn = data->conn; in imap_perform_select() local
686 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_select()
876 struct connectdata *conn = data->conn; in imap_state_servergreet_resp() local
881 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_servergreet_resp()
890 return imap_perform_capability(data, conn); in imap_state_servergreet_resp()
899 struct connectdata *conn = data->conn; in imap_state_capability_resp() local
900 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_capability_resp()
957 else if(data->set.use_ssl && !Curl_conn_is_ssl(conn, FIRSTSOCKET)) { in imap_state_capability_resp()
964 result = imap_perform_authentication(data, conn); in imap_state_capability_resp()
971 result = imap_perform_authentication(data, conn); in imap_state_capability_resp()
982 struct connectdata *conn = data->conn; in imap_state_starttls_resp() local
987 if(data->conn->proto.imapc.pp.overflow) in imap_state_starttls_resp()
996 result = imap_perform_authentication(data, conn); in imap_state_starttls_resp()
999 result = imap_perform_upgrade_tls(data, conn); in imap_state_starttls_resp()
1006 struct connectdata *conn, in imap_state_auth_resp() argument
1011 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_auth_resp()
1025 result = imap_perform_login(data, conn); in imap_state_auth_resp()
1063 char *line = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf); in imap_state_listsearch_resp()
1064 size_t len = data->conn->proto.imapc.pp.nfinal; in imap_state_listsearch_resp()
1084 struct connectdata *conn = data->conn; in imap_state_select_resp() local
1086 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_select_resp()
1087 const char *line = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf); in imap_state_select_resp()
1140 struct connectdata *conn, int imapcode, in imap_state_fetch_resp() argument
1144 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_fetch_resp()
1146 const char *ptr = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf); in imap_state_fetch_resp()
1147 size_t len = data->conn->proto.imapc.pp.nfinal; in imap_state_fetch_resp()
1298 struct connectdata *conn) in imap_statemachine() argument
1302 struct imap_conn *imapc = &conn->proto.imapc; in imap_statemachine()
1309 return imap_perform_upgrade_tls(data, conn); in imap_statemachine()
1343 result = imap_state_auth_resp(data, conn, imapcode, imapc->state); in imap_statemachine()
1360 result = imap_state_fetch_resp(data, conn, imapcode, imapc->state); in imap_statemachine()
1390 struct connectdata *conn = data->conn; in imap_multi_statemach() local
1391 struct imap_conn *imapc = &conn->proto.imapc; in imap_multi_statemach()
1393 if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone) { in imap_multi_statemach()
1408 struct connectdata *conn, in imap_block_statemach() argument
1412 struct imap_conn *imapc = &conn->proto.imapc; in imap_block_statemach()
1436 struct connectdata *conn, in imap_getsock() argument
1439 return Curl_pp_getsock(data, &conn->proto.imapc.pp, socks); in imap_getsock()
1455 struct connectdata *conn = data->conn; in imap_connect() local
1456 struct imap_conn *imapc = &conn->proto.imapc; in imap_connect()
1462 connkeep(conn, "IMAP default"); in imap_connect()
1474 result = imap_parse_url_options(conn); in imap_connect()
1502 struct connectdata *conn = data->conn; in imap_done() local
1511 connclose(conn, "IMAP done with bad status"); /* marked for closure */ in imap_done()
1523 result = Curl_pp_sendf(data, &conn->proto.imapc.pp, "%s", ""); in imap_done()
1530 result = imap_block_statemach(data, conn, FALSE); in imap_done()
1562 struct connectdata *conn = data->conn; in imap_perform() local
1564 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform()
1611 *connected = Curl_conn_is_connected(conn, FIRSTSOCKET); in imap_perform()
1656 struct connectdata *conn, bool dead_connection) in imap_disconnect() argument
1658 struct imap_conn *imapc = &conn->proto.imapc; in imap_disconnect()
1667 if(!dead_connection && conn->bits.protoconnstart) { in imap_disconnect()
1669 (void)imap_block_statemach(data, conn, TRUE); /* ignore errors */ in imap_disconnect()
1677 Curl_sasl_cleanup(conn, imapc->sasl.authused); in imap_disconnect()
1751 struct connectdata *conn) in imap_setup_connection() argument
1759 conn->bits.tls_upgraded = FALSE; in imap_setup_connection()
1775 struct imap_conn *imapc = &data->conn->proto.imapc; in imap_sendf()
1781 'A' + curlx_sltosi((long)(data->conn->connection_id % 26)), in imap_sendf()
1889 static CURLcode imap_parse_url_options(struct connectdata *conn) in imap_parse_url_options() argument
1892 struct imap_conn *imapc = &conn->proto.imapc; in imap_parse_url_options()
1893 const char *ptr = conn->options; in imap_parse_url_options()