Lines Matching refs:data
90 static CURLcode smtp_regular_transfer(struct Curl_easy *data, bool *done);
91 static CURLcode smtp_do(struct Curl_easy *data, bool *done);
92 static CURLcode smtp_done(struct Curl_easy *data, CURLcode status,
94 static CURLcode smtp_connect(struct Curl_easy *data, bool *done);
95 static CURLcode smtp_disconnect(struct Curl_easy *data,
97 static CURLcode smtp_multi_statemach(struct Curl_easy *data, bool *done);
98 static int smtp_getsock(struct Curl_easy *data,
100 static CURLcode smtp_doing(struct Curl_easy *data, bool *dophase_done);
101 static CURLcode smtp_setup_connection(struct Curl_easy *data,
104 static CURLcode smtp_parse_url_path(struct Curl_easy *data);
105 static CURLcode smtp_parse_custom_request(struct Curl_easy *data);
108 static CURLcode smtp_perform_auth(struct Curl_easy *data, const char *mech,
110 static CURLcode smtp_continue_auth(struct Curl_easy *data, const char *mech,
112 static CURLcode smtp_cancel_auth(struct Curl_easy *data, const char *mech);
113 static CURLcode smtp_get_message(struct Curl_easy *data, struct bufref *out);
114 static CURLcode cr_eob_add(struct Curl_easy *data);
211 static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn, in smtp_endofresp() argument
216 (void)data; in smtp_endofresp()
254 static CURLcode smtp_get_message(struct Curl_easy *data, struct bufref *out) in smtp_get_message() argument
256 char *message = Curl_dyn_ptr(&data->conn->proto.smtpc.pp.recvbuf); in smtp_get_message()
257 size_t len = data->conn->proto.smtpc.pp.nfinal; in smtp_get_message()
288 static void smtp_state(struct Curl_easy *data, smtpstate newstate) in smtp_state() argument
290 struct smtp_conn *smtpc = &data->conn->proto.smtpc; in smtp_state()
311 CURL_TRC_SMTP(data, "state change from %s to %s", in smtp_state()
325 static CURLcode smtp_perform_ehlo(struct Curl_easy *data) in smtp_perform_ehlo() argument
328 struct connectdata *conn = data->conn; in smtp_perform_ehlo()
338 result = Curl_pp_sendf(data, &smtpc->pp, "EHLO %s", smtpc->domain); in smtp_perform_ehlo()
341 smtp_state(data, SMTP_EHLO); in smtp_perform_ehlo()
352 static CURLcode smtp_perform_helo(struct Curl_easy *data, in smtp_perform_helo() argument
362 result = Curl_pp_sendf(data, &smtpc->pp, "HELO %s", smtpc->domain); in smtp_perform_helo()
365 smtp_state(data, SMTP_HELO); in smtp_perform_helo()
376 static CURLcode smtp_perform_starttls(struct Curl_easy *data, in smtp_perform_starttls() argument
380 CURLcode result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, in smtp_perform_starttls()
384 smtp_state(data, SMTP_STARTTLS); in smtp_perform_starttls()
395 static CURLcode smtp_perform_upgrade_tls(struct Curl_easy *data) in smtp_perform_upgrade_tls() argument
398 struct connectdata *conn = data->conn; in smtp_perform_upgrade_tls()
404 result = Curl_ssl_cfilter_add(data, conn, FIRSTSOCKET); in smtp_perform_upgrade_tls()
409 result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone); in smtp_perform_upgrade_tls()
413 smtp_state(data, SMTP_UPGRADETLS); in smtp_perform_upgrade_tls()
417 result = smtp_perform_ehlo(data); in smtp_perform_upgrade_tls()
431 static CURLcode smtp_perform_auth(struct Curl_easy *data, in smtp_perform_auth() argument
436 struct smtp_conn *smtpc = &data->conn->proto.smtpc; in smtp_perform_auth()
441 result = Curl_pp_sendf(data, &smtpc->pp, "AUTH %s %s", mech, ir); in smtp_perform_auth()
445 result = Curl_pp_sendf(data, &smtpc->pp, "AUTH %s", mech); in smtp_perform_auth()
457 static CURLcode smtp_continue_auth(struct Curl_easy *data, in smtp_continue_auth() argument
461 struct smtp_conn *smtpc = &data->conn->proto.smtpc; in smtp_continue_auth()
465 return Curl_pp_sendf(data, &smtpc->pp, in smtp_continue_auth()
475 static CURLcode smtp_cancel_auth(struct Curl_easy *data, const char *mech) in smtp_cancel_auth() argument
477 struct smtp_conn *smtpc = &data->conn->proto.smtpc; in smtp_cancel_auth()
481 return Curl_pp_sendf(data, &smtpc->pp, "*"); in smtp_cancel_auth()
491 static CURLcode smtp_perform_authentication(struct Curl_easy *data) in smtp_perform_authentication() argument
494 struct connectdata *conn = data->conn; in smtp_perform_authentication()
501 !Curl_sasl_can_authenticate(&smtpc->sasl, data)) { in smtp_perform_authentication()
502 smtp_state(data, SMTP_STOP); in smtp_perform_authentication()
507 result = Curl_sasl_start(&smtpc->sasl, data, FALSE, &progress); in smtp_perform_authentication()
511 smtp_state(data, SMTP_AUTH); in smtp_perform_authentication()
514 infof(data, "No known authentication mechanisms supported"); in smtp_perform_authentication()
528 static CURLcode smtp_perform_command(struct Curl_easy *data) in smtp_perform_command() argument
531 struct connectdata *conn = data->conn; in smtp_perform_command()
532 struct SMTP *smtp = data->req.p.smtp; in smtp_perform_command()
547 result = smtp_parse_address(smtp->rcpt->data, in smtp_perform_command()
560 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "VRFY %s%s%s%s", in smtp_perform_command()
576 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, in smtp_perform_command()
578 smtp->rcpt->data, in smtp_perform_command()
584 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s", in smtp_perform_command()
589 smtp_state(data, SMTP_COMMAND); in smtp_perform_command()
600 static CURLcode smtp_perform_mail(struct Curl_easy *data) in smtp_perform_mail() argument
606 struct connectdata *conn = data->conn; in smtp_perform_mail()
615 if(data->set.str[STRING_MAIL_FROM]) { in smtp_perform_mail()
621 result = smtp_parse_address(data->set.str[STRING_MAIL_FROM], in smtp_perform_mail()
654 if(data->set.str[STRING_MAIL_AUTH] && conn->proto.smtpc.sasl.authused) { in smtp_perform_mail()
655 if(data->set.str[STRING_MAIL_AUTH][0] != '\0') { in smtp_perform_mail()
661 result = smtp_parse_address(data->set.str[STRING_MAIL_AUTH], in smtp_perform_mail()
696 if(data->set.mimepost.kind != MIMEKIND_NONE) { in smtp_perform_mail()
698 data->set.mimepost.flags &= ~(unsigned int)MIME_BODY_ONLY; in smtp_perform_mail()
701 curl_mime_headers(&data->set.mimepost, data->set.headers, 0); in smtp_perform_mail()
702 result = Curl_mime_prepare_headers(data, &data->set.mimepost, NULL, in smtp_perform_mail()
706 if(!Curl_checkheaders(data, STRCONST("Mime-Version"))) in smtp_perform_mail()
707 result = Curl_mime_add_header(&data->set.mimepost.curlheaders, in smtp_perform_mail()
711 result = Curl_creader_set_mime(data, &data->set.mimepost); in smtp_perform_mail()
714 data->state.infilesize = Curl_creader_total_length(data); in smtp_perform_mail()
719 result = Curl_creader_set_fread(data, data->state.infilesize); in smtp_perform_mail()
725 if(conn->proto.smtpc.size_supported && data->state.infilesize > 0) { in smtp_perform_mail()
726 size = aprintf("%" FMT_OFF_T, data->state.infilesize); in smtp_perform_mail()
739 struct SMTP *smtp = data->req.p.smtp; in smtp_perform_mail()
744 if(!Curl_is_ASCII_name(rcpt->data)) in smtp_perform_mail()
752 result = cr_eob_add(data); in smtp_perform_mail()
757 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, in smtp_perform_mail()
773 smtp_state(data, SMTP_MAIL); in smtp_perform_mail()
785 static CURLcode smtp_perform_rcpt_to(struct Curl_easy *data) in smtp_perform_rcpt_to() argument
788 struct connectdata *conn = data->conn; in smtp_perform_rcpt_to()
789 struct SMTP *smtp = data->req.p.smtp; in smtp_perform_rcpt_to()
795 result = smtp_parse_address(smtp->rcpt->data, in smtp_perform_rcpt_to()
802 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "RCPT TO:<%s@%s>", in smtp_perform_rcpt_to()
807 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "RCPT TO:<%s>", in smtp_perform_rcpt_to()
814 smtp_state(data, SMTP_RCPT); in smtp_perform_rcpt_to()
825 static CURLcode smtp_perform_quit(struct Curl_easy *data, in smtp_perform_quit() argument
829 CURLcode result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s", "QUIT"); in smtp_perform_quit()
832 smtp_state(data, SMTP_QUIT); in smtp_perform_quit()
838 static CURLcode smtp_state_servergreet_resp(struct Curl_easy *data, in smtp_state_servergreet_resp() argument
846 failf(data, "Got unexpected smtp-server response: %d", smtpcode); in smtp_state_servergreet_resp()
850 result = smtp_perform_ehlo(data); in smtp_state_servergreet_resp()
856 static CURLcode smtp_state_starttls_resp(struct Curl_easy *data, in smtp_state_starttls_resp() argument
864 if(data->conn->proto.smtpc.pp.overflow) in smtp_state_starttls_resp()
868 if(data->set.use_ssl != CURLUSESSL_TRY) { in smtp_state_starttls_resp()
869 failf(data, "STARTTLS denied, code %d", smtpcode); in smtp_state_starttls_resp()
873 result = smtp_perform_authentication(data); in smtp_state_starttls_resp()
876 result = smtp_perform_upgrade_tls(data); in smtp_state_starttls_resp()
882 static CURLcode smtp_state_ehlo_resp(struct Curl_easy *data, in smtp_state_ehlo_resp() argument
894 if(data->set.use_ssl <= CURLUSESSL_TRY in smtp_state_ehlo_resp()
896 result = smtp_perform_helo(data, conn); in smtp_state_ehlo_resp()
898 failf(data, "Remote access denied: %d", smtpcode); in smtp_state_ehlo_resp()
960 if(data->set.use_ssl && !Curl_conn_is_ssl(conn, FIRSTSOCKET)) { in smtp_state_ehlo_resp()
964 result = smtp_perform_starttls(data, conn); in smtp_state_ehlo_resp()
965 else if(data->set.use_ssl == CURLUSESSL_TRY) in smtp_state_ehlo_resp()
967 result = smtp_perform_authentication(data); in smtp_state_ehlo_resp()
969 failf(data, "STARTTLS not supported."); in smtp_state_ehlo_resp()
974 result = smtp_perform_authentication(data); in smtp_state_ehlo_resp()
978 failf(data, "Unexpectedly short EHLO response"); in smtp_state_ehlo_resp()
986 static CURLcode smtp_state_helo_resp(struct Curl_easy *data, int smtpcode, in smtp_state_helo_resp() argument
993 failf(data, "Remote access denied: %d", smtpcode); in smtp_state_helo_resp()
998 smtp_state(data, SMTP_STOP); in smtp_state_helo_resp()
1004 static CURLcode smtp_state_auth_resp(struct Curl_easy *data, in smtp_state_auth_resp() argument
1009 struct connectdata *conn = data->conn; in smtp_state_auth_resp()
1015 result = Curl_sasl_continue(&smtpc->sasl, data, smtpcode, &progress); in smtp_state_auth_resp()
1019 smtp_state(data, SMTP_STOP); /* Authenticated */ in smtp_state_auth_resp()
1022 failf(data, "Authentication cancelled"); in smtp_state_auth_resp()
1033 static CURLcode smtp_state_command_resp(struct Curl_easy *data, int smtpcode, in smtp_state_command_resp() argument
1037 struct SMTP *smtp = data->req.p.smtp; in smtp_state_command_resp()
1038 char *line = Curl_dyn_ptr(&data->conn->proto.smtpc.pp.recvbuf); in smtp_state_command_resp()
1039 size_t len = data->conn->proto.smtpc.pp.nfinal; in smtp_state_command_resp()
1045 failf(data, "Command failed: %d", smtpcode); in smtp_state_command_resp()
1049 if(!data->req.no_body) in smtp_state_command_resp()
1050 result = Curl_client_write(data, CLIENTWRITE_BODY, line, len); in smtp_state_command_resp()
1058 result = smtp_perform_command(data); in smtp_state_command_resp()
1062 smtp_state(data, SMTP_STOP); in smtp_state_command_resp()
1066 smtp_state(data, SMTP_STOP); in smtp_state_command_resp()
1074 static CURLcode smtp_state_mail_resp(struct Curl_easy *data, int smtpcode, in smtp_state_mail_resp() argument
1081 failf(data, "MAIL failed: %d", smtpcode); in smtp_state_mail_resp()
1086 result = smtp_perform_rcpt_to(data); in smtp_state_mail_resp()
1092 static CURLcode smtp_state_rcpt_resp(struct Curl_easy *data, in smtp_state_rcpt_resp() argument
1097 struct SMTP *smtp = data->req.p.smtp; in smtp_state_rcpt_resp()
1107 is_smtp_blocking_err = (is_smtp_err && !data->set.mail_rcpt_allowfails); in smtp_state_rcpt_resp()
1115 failf(data, "RCPT failed: %d", smtpcode); in smtp_state_rcpt_resp()
1129 result = smtp_perform_rcpt_to(data); in smtp_state_rcpt_resp()
1134 failf(data, "RCPT failed: %d (last error)", smtp->rcpt_last_error); in smtp_state_rcpt_resp()
1139 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s", "DATA"); in smtp_state_rcpt_resp()
1142 smtp_state(data, SMTP_DATA); in smtp_state_rcpt_resp()
1151 static CURLcode smtp_state_data_resp(struct Curl_easy *data, int smtpcode, in smtp_state_data_resp() argument
1158 failf(data, "DATA failed: %d", smtpcode); in smtp_state_data_resp()
1163 Curl_pgrsSetUploadSize(data, data->state.infilesize); in smtp_state_data_resp()
1166 Curl_xfer_setup1(data, CURL_XFER_SEND, -1, FALSE); in smtp_state_data_resp()
1169 smtp_state(data, SMTP_STOP); in smtp_state_data_resp()
1177 static CURLcode smtp_state_postdata_resp(struct Curl_easy *data, in smtp_state_postdata_resp() argument
1189 smtp_state(data, SMTP_STOP); in smtp_state_postdata_resp()
1194 static CURLcode smtp_statemachine(struct Curl_easy *data, in smtp_statemachine() argument
1206 return smtp_perform_upgrade_tls(data); in smtp_statemachine()
1210 return Curl_pp_flushsend(data, pp); in smtp_statemachine()
1214 result = Curl_pp_readresp(data, FIRSTSOCKET, pp, &smtpcode, &nread); in smtp_statemachine()
1220 data->info.httpcode = smtpcode; in smtp_statemachine()
1228 result = smtp_state_servergreet_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1232 result = smtp_state_ehlo_resp(data, conn, smtpcode, smtpc->state); in smtp_statemachine()
1236 result = smtp_state_helo_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1240 result = smtp_state_starttls_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1248 result = smtp_state_auth_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1252 result = smtp_state_command_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1256 result = smtp_state_mail_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1260 result = smtp_state_rcpt_resp(data, conn, smtpcode, smtpc->state); in smtp_statemachine()
1264 result = smtp_state_data_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1268 result = smtp_state_postdata_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1274 smtp_state(data, SMTP_STOP); in smtp_statemachine()
1283 static CURLcode smtp_multi_statemach(struct Curl_easy *data, bool *done) in smtp_multi_statemach() argument
1286 struct connectdata *conn = data->conn; in smtp_multi_statemach()
1291 result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone); in smtp_multi_statemach()
1297 result = Curl_pp_statemach(data, &smtpc->pp, FALSE, FALSE); in smtp_multi_statemach()
1303 static CURLcode smtp_block_statemach(struct Curl_easy *data, in smtp_block_statemach() argument
1311 result = Curl_pp_statemach(data, &smtpc->pp, TRUE, disconnecting); in smtp_block_statemach()
1318 static CURLcode smtp_init(struct Curl_easy *data) in smtp_init() argument
1323 smtp = data->req.p.smtp = calloc(1, sizeof(struct SMTP)); in smtp_init()
1331 static int smtp_getsock(struct Curl_easy *data, in smtp_getsock() argument
1334 return Curl_pp_getsock(data, &conn->proto.smtpc.pp, socks); in smtp_getsock()
1347 static CURLcode smtp_connect(struct Curl_easy *data, bool *done) in smtp_connect() argument
1350 struct connectdata *conn = data->conn; in smtp_connect()
1362 Curl_sasl_init(&smtpc->sasl, data, &saslsmtp); in smtp_connect()
1373 result = smtp_parse_url_path(data); in smtp_connect()
1378 smtp_state(data, SMTP_SERVERGREET); in smtp_connect()
1380 result = smtp_multi_statemach(data, done); in smtp_connect()
1394 static CURLcode smtp_done(struct Curl_easy *data, CURLcode status, in smtp_done() argument
1398 struct connectdata *conn = data->conn; in smtp_done()
1399 struct SMTP *smtp = data->req.p.smtp; in smtp_done()
1413 else if(!data->set.connect_only && data->set.mail_rcpt && in smtp_done()
1414 (data->state.upload || IS_MIME_POST(data))) { in smtp_done()
1416 smtp_state(data, SMTP_POSTDATA); in smtp_done()
1419 result = smtp_block_statemach(data, conn, FALSE); in smtp_done()
1424 CURL_TRC_SMTP(data, "smtp_done(status=%d, premature=%d) -> %d", in smtp_done()
1436 static CURLcode smtp_perform(struct Curl_easy *data, bool *connected, in smtp_perform() argument
1441 struct SMTP *smtp = data->req.p.smtp; in smtp_perform()
1443 CURL_TRC_SMTP(data, "smtp_perform(), start"); in smtp_perform()
1445 if(data->req.no_body) { in smtp_perform()
1453 smtp->rcpt = data->set.mail_rcpt; in smtp_perform()
1467 if((data->state.upload || IS_MIME_POST(data)) && data->set.mail_rcpt) in smtp_perform()
1469 result = smtp_perform_mail(data); in smtp_perform()
1472 result = smtp_perform_command(data); in smtp_perform()
1478 result = smtp_multi_statemach(data, dophase_done); in smtp_perform()
1480 *connected = Curl_conn_is_connected(data->conn, FIRSTSOCKET); in smtp_perform()
1483 CURL_TRC_SMTP(data, "smtp_perform() -> %d, connected=%d, done=%d", in smtp_perform()
1497 static CURLcode smtp_do(struct Curl_easy *data, bool *done) in smtp_do() argument
1500 DEBUGASSERT(data); in smtp_do()
1501 DEBUGASSERT(data->conn); in smtp_do()
1505 result = smtp_parse_custom_request(data); in smtp_do()
1509 result = smtp_regular_transfer(data, done); in smtp_do()
1510 CURL_TRC_SMTP(data, "smtp_do() -> %d, done=%d", result, *done); in smtp_do()
1521 static CURLcode smtp_disconnect(struct Curl_easy *data, in smtp_disconnect() argument
1526 (void)data; in smtp_disconnect()
1533 if(!smtp_perform_quit(data, conn)) in smtp_disconnect()
1534 (void)smtp_block_statemach(data, conn, TRUE); /* ignore errors on QUIT */ in smtp_disconnect()
1545 CURL_TRC_SMTP(data, "smtp_disconnect(), finished"); in smtp_disconnect()
1551 static CURLcode smtp_dophase_done(struct Curl_easy *data, bool connected) in smtp_dophase_done() argument
1553 struct SMTP *smtp = data->req.p.smtp; in smtp_dophase_done()
1559 Curl_xfer_setup_nop(data); in smtp_dophase_done()
1565 static CURLcode smtp_doing(struct Curl_easy *data, bool *dophase_done) in smtp_doing() argument
1567 CURLcode result = smtp_multi_statemach(data, dophase_done); in smtp_doing()
1570 DEBUGF(infof(data, "DO phase failed")); in smtp_doing()
1572 result = smtp_dophase_done(data, FALSE /* not connected */); in smtp_doing()
1574 DEBUGF(infof(data, "DO phase is complete")); in smtp_doing()
1577 CURL_TRC_SMTP(data, "smtp_doing() -> %d, done=%d", result, *dophase_done); in smtp_doing()
1590 static CURLcode smtp_regular_transfer(struct Curl_easy *data, in smtp_regular_transfer() argument
1597 data->req.size = -1; in smtp_regular_transfer()
1600 Curl_pgrsSetUploadCounter(data, 0); in smtp_regular_transfer()
1601 Curl_pgrsSetDownloadCounter(data, 0); in smtp_regular_transfer()
1602 Curl_pgrsSetUploadSize(data, -1); in smtp_regular_transfer()
1603 Curl_pgrsSetDownloadSize(data, -1); in smtp_regular_transfer()
1606 result = smtp_perform(data, &connected, dophase_done); in smtp_regular_transfer()
1610 result = smtp_dophase_done(data, connected); in smtp_regular_transfer()
1612 CURL_TRC_SMTP(data, "smtp_regular_transfer() -> %d, done=%d", in smtp_regular_transfer()
1617 static CURLcode smtp_setup_connection(struct Curl_easy *data, in smtp_setup_connection() argument
1626 result = smtp_init(data); in smtp_setup_connection()
1627 CURL_TRC_SMTP(data, "smtp_setup_connection() -> %d", result); in smtp_setup_connection()
1674 static CURLcode smtp_parse_url_path(struct Curl_easy *data) in smtp_parse_url_path() argument
1677 struct connectdata *conn = data->conn; in smtp_parse_url_path()
1679 const char *path = &data->state.up.path[1]; /* skip leading path */ in smtp_parse_url_path()
1700 static CURLcode smtp_parse_custom_request(struct Curl_easy *data) in smtp_parse_custom_request() argument
1703 struct SMTP *smtp = data->req.p.smtp; in smtp_parse_custom_request()
1704 const char *custom = data->set.str[STRING_CUSTOMREQUEST]; in smtp_parse_custom_request()
1795 static CURLcode cr_eob_init(struct Curl_easy *data, in cr_eob_init() argument
1799 (void)data; in cr_eob_init()
1807 static void cr_eob_close(struct Curl_easy *data, struct Curl_creader *reader) in cr_eob_close() argument
1810 (void)data; in cr_eob_close()
1819 static CURLcode cr_eob_read(struct Curl_easy *data, in cr_eob_read() argument
1831 result = Curl_creader_read(data, reader->next, buf, blen, &nread, &eos); in cr_eob_read()
1855 if(data->state.infilesize > 0) in cr_eob_read()
1856 data->state.infilesize++; in cr_eob_read()
1911 DEBUGF(infof(data, "cr_eob_read(%zu) -> %d, %zd, %d", in cr_eob_read()
1916 static curl_off_t cr_eob_total_length(struct Curl_easy *data, in cr_eob_total_length() argument
1920 (void)data; in cr_eob_total_length()
1940 static CURLcode cr_eob_add(struct Curl_easy *data) in cr_eob_add() argument
1945 result = Curl_creader_create(&reader, data, &cr_eob, in cr_eob_add()
1948 result = Curl_creader_add(data, reader); in cr_eob_add()
1951 Curl_creader_free(data, reader); in cr_eob_add()