Skip to content
Permalink
Browse files

Multiple 'RCPT TO': Added some comments to the code.

  • Loading branch information
volpav committed Jan 14, 2020
1 parent 4abb834 commit c344932bbd163c18c91f5abc42158e7fa2f89d49
Showing with 11 additions and 5 deletions.
  1. +5 −5 lib/setopt.c
  2. +6 −0 lib/smtp.c
@@ -2485,13 +2485,13 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
* for generic server options, the application will need to set this.
*/
result = Curl_setstropt(&data->set.str[STRING_RTSP_STREAM_URI],
recipientsar *));
brerecipients
va_arg(param, char *));
break;

case recipients
case CURLOPT_RTSP_TRANSPORT:
/*
* recipientsfor the RTSP request
*/recipients
* The content of the Transport: header for the RTSP request
*/
result = Curl_setstropt(&data->set.str[STRING_RTSP_TRANSPORT],
va_arg(param, char *));
break;
@@ -919,17 +919,23 @@ static CURLcode smtp_state_rcpt_resp(struct connectdata *conn, int smtpcode,
(void)instate; /* no use for this yet */

bool is_smtp_err = smtpcode/100 != 2;

/* If there's multiple "RCPT TO" to be issued, it's possible to ignore errors
and proceed with only the valid addresses. */
bool is_smtp_blocking_err =
is_smtp_err && !data->set.mail_rcpt_ignore_invalid;

if (is_smtp_err) {
/* Remembering the last failure which we can report if all "RCPT TO" have
failed and we cannot proceed. */
smtp->rcpt_last_error = smtpcode;

if (is_smtp_blocking_err) {
failf(data, "RCPT failed: %d", smtpcode);
result = CURLE_SEND_ERROR;
}
} else {
/* Some "RCPT TO" have succeeded. */
smtp->rcpt_had_ok = TRUE;
}

0 comments on commit c344932

Please sign in to comment.
You can’t perform that action at this time.