Lines Matching refs:imapc
288 struct imap_conn *imapc = &conn->proto.imapc; in imap_endofresp() local
289 const char *id = imapc->resptag; in imap_endofresp()
313 switch(imapc->state) { in imap_endofresp()
365 switch(imapc->state) { in imap_endofresp()
421 struct imap_conn *imapc = &conn->proto.imapc; in state() local
443 if(imapc->state != newstate) in state()
445 (void *)imapc, names[imapc->state], names[newstate]); in state()
448 imapc->state = newstate; in state()
461 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_capability() local
463 imapc->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */ in imap_perform_capability()
464 imapc->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */ in imap_perform_capability()
465 imapc->tls_supported = FALSE; /* Clear the TLS capability */ in imap_perform_capability()
504 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_upgrade_tls() local
507 result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone); in imap_perform_upgrade_tls()
510 if(imapc->state != IMAP_UPGRADETLS) in imap_perform_upgrade_tls()
513 if(imapc->ssldone) { in imap_perform_upgrade_tls()
593 struct imap_conn *imapc = &conn->proto.imapc; in imap_continue_authenticate() local
595 return Curl_pp_sendf(&imapc->pp, "%s", resp); in imap_continue_authenticate()
609 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_authentication() local
614 if(!Curl_sasl_can_authenticate(&imapc->sasl, conn)) { in imap_perform_authentication()
620 result = Curl_sasl_start(&imapc->sasl, conn, imapc->ir_supported, &progress); in imap_perform_authentication()
625 else if(!imapc->login_disabled && (imapc->preftype & IMAP_TYPE_CLEARTEXT)) in imap_perform_authentication()
684 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_select() local
688 Curl_safefree(imapc->mailbox); in imap_perform_select()
689 Curl_safefree(imapc->mailbox_uidvalidity); in imap_perform_select()
860 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_capability_resp() local
890 imapc->tls_supported = TRUE; in imap_state_capability_resp()
894 imapc->login_disabled = TRUE; in imap_state_capability_resp()
898 imapc->ir_supported = TRUE; in imap_state_capability_resp()
911 imapc->sasl.authmechs |= mechbit; in imap_state_capability_resp()
920 if(imapc->tls_supported) in imap_state_capability_resp()
971 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_auth_resp() local
976 result = Curl_sasl_continue(&imapc->sasl, conn, imapcode, &progress); in imap_state_auth_resp()
983 if((!imapc->login_disabled) && (imapc->preftype & IMAP_TYPE_CLEARTEXT)) in imap_state_auth_resp()
1051 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_select_resp() local
1060 Curl_safefree(imapc->mailbox_uidvalidity); in imap_state_select_resp()
1061 imapc->mailbox_uidvalidity = strdup(tmp); in imap_state_select_resp()
1066 if(imap->uidvalidity && imapc->mailbox_uidvalidity && in imap_state_select_resp()
1067 strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)) { in imap_state_select_resp()
1073 imapc->mailbox = strdup(imap->mailbox); in imap_state_select_resp()
1097 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_fetch_resp() local
1098 struct pingpong *pp = &imapc->pp; in imap_state_fetch_resp()
1278 struct imap_conn *imapc = &conn->proto.imapc; in imap_statemach_act() local
1279 struct pingpong *pp = &imapc->pp; in imap_statemach_act()
1283 if(imapc->state == IMAP_UPGRADETLS) in imap_statemach_act()
1304 switch(imapc->state) { in imap_statemach_act()
1306 result = imap_state_servergreet_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1310 result = imap_state_capability_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1314 result = imap_state_starttls_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1318 result = imap_state_auth_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1322 result = imap_state_login_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1326 result = imap_state_list_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1330 result = imap_state_select_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1334 result = imap_state_fetch_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1338 result = imap_state_fetch_final_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1342 result = imap_state_append_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1346 result = imap_state_append_final_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1350 result = imap_state_search_resp(conn, imapcode, imapc->state); in imap_statemach_act()
1360 } while(!result && imapc->state != IMAP_STOP && Curl_pp_moredata(pp)); in imap_statemach_act()
1369 struct imap_conn *imapc = &conn->proto.imapc; in imap_multi_statemach() local
1371 if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone) { in imap_multi_statemach()
1372 result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone); in imap_multi_statemach()
1373 if(result || !imapc->ssldone) in imap_multi_statemach()
1377 result = Curl_pp_statemach(&imapc->pp, FALSE); in imap_multi_statemach()
1378 *done = (imapc->state == IMAP_STOP) ? TRUE : FALSE; in imap_multi_statemach()
1386 struct imap_conn *imapc = &conn->proto.imapc; in imap_block_statemach() local
1388 while(imapc->state != IMAP_STOP && !result) in imap_block_statemach()
1389 result = Curl_pp_statemach(&imapc->pp, TRUE); in imap_block_statemach()
1413 return Curl_pp_getsock(&conn->proto.imapc.pp, socks, numsocks); in imap_getsock()
1429 struct imap_conn *imapc = &conn->proto.imapc; in imap_connect() local
1430 struct pingpong *pp = &imapc->pp; in imap_connect()
1444 imapc->preftype = IMAP_TYPE_ANY; in imap_connect()
1445 Curl_sasl_init(&imapc->sasl, &saslimap); in imap_connect()
1459 strcpy(imapc->resptag, "*"); in imap_connect()
1502 result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", ""); in imap_done()
1548 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform() local
1562 if(imap->mailbox && imapc->mailbox && in imap_perform()
1563 !strcmp(imap->mailbox, imapc->mailbox) && in imap_perform()
1564 (!imap->uidvalidity || !imapc->mailbox_uidvalidity || in imap_perform()
1565 !strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity))) in imap_perform()
1642 struct imap_conn *imapc = &conn->proto.imapc; in imap_disconnect() local
1650 if(!dead_connection && imapc->pp.conn && imapc->pp.conn->bits.protoconnstart) in imap_disconnect()
1655 Curl_pp_disconnect(&imapc->pp); in imap_disconnect()
1658 Curl_sasl_cleanup(conn, imapc->sasl.authused); in imap_disconnect()
1661 Curl_safefree(imapc->mailbox); in imap_disconnect()
1662 Curl_safefree(imapc->mailbox_uidvalidity); in imap_disconnect()
1780 struct imap_conn *imapc = &conn->proto.imapc; in imap_sendf() local
1787 imapc->cmdid = (imapc->cmdid + 1) % 1000; in imap_sendf()
1790 snprintf(imapc->resptag, sizeof(imapc->resptag), "%c%03d", in imap_sendf()
1791 'A' + curlx_sltosi(conn->connection_id % 26), imapc->cmdid); in imap_sendf()
1794 taggedfmt = aprintf("%s %s", imapc->resptag, fmt); in imap_sendf()
1800 result = Curl_pp_vsendf(&imapc->pp, taggedfmt, ap); in imap_sendf()
1931 struct imap_conn *imapc = &conn->proto.imapc; in imap_parse_url_options() local
1934 imapc->sasl.resetprefs = TRUE; in imap_parse_url_options()
1949 result = Curl_sasl_parse_url_auth_option(&imapc->sasl, in imap_parse_url_options()
1958 switch(imapc->sasl.prefmech) { in imap_parse_url_options()
1960 imapc->preftype = IMAP_TYPE_NONE; in imap_parse_url_options()
1963 imapc->preftype = IMAP_TYPE_ANY; in imap_parse_url_options()
1966 imapc->preftype = IMAP_TYPE_SASL; in imap_parse_url_options()