diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-04-16 19:32:55 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-04-16 19:44:49 +0100 |
commit | e621a5f6ea12266feb62531099f0c8cf763eb68f (patch) | |
tree | e273b511fd8535e1f13eb1a42bda6113a1b0af7a | |
parent | 8093f9541e1be58399adfd23d80fa8f98dc39966 (diff) |
smtp: Moved smtp_rcpt_to() to be with the other perform functions
-rw-r--r-- | lib/smtp.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/smtp.c b/lib/smtp.c index e945b41e1..fd0b746d9 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -569,6 +569,27 @@ static CURLcode smtp_mail(struct connectdata *conn) return result; } +static CURLcode smtp_rcpt_to(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + struct SessionHandle *data = conn->data; + struct SMTP *smtp = data->state.proto.smtp; + + /* Send the RCPT TO command */ + if(smtp->rcpt) { + if(smtp->rcpt->data[0] == '<') + result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:%s", + smtp->rcpt->data); + else + result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>", + smtp->rcpt->data); + if(!result) + state(conn, SMTP_RCPT); + } + + return result; +} + /* For the initial server greeting */ static CURLcode smtp_state_servergreet_resp(struct connectdata *conn, int smtpcode, @@ -1006,27 +1027,6 @@ static CURLcode smtp_state_auth_final_resp(struct connectdata *conn, return result; } -static CURLcode smtp_rcpt_to(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; - struct SMTP *smtp = data->state.proto.smtp; - - /* Send the RCPT TO command */ - if(smtp->rcpt) { - if(smtp->rcpt->data[0] == '<') - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:%s", - smtp->rcpt->data); - else - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>", - smtp->rcpt->data); - if(!result) - state(conn, SMTP_RCPT); - } - - return result; -} - /* For MAIL responses */ static CURLcode smtp_state_mail_resp(struct connectdata *conn, int smtpcode, smtpstate instate) |