Skip to content

Commit

Permalink
Multiple 'RCPT TO': Added some comments to the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
volpav committed Jan 14, 2020
1 parent 4abb834 commit c344932
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/setopt.c
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions lib/smtp.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit c344932

Please sign in to comment.