return TRUE;
}
+bool smtp_server_command_reply_is_forwarded(struct smtp_server_command *cmd)
+{
+ unsigned int i;
+
+ if (!array_is_created(&cmd->replies))
+ return FALSE;
+
+ for (i = 0; i < cmd->replies_expected; i++) {
+ const struct smtp_server_reply *reply =
+ array_idx(&cmd->replies, i);
+ if (!reply->submitted)
+ return FALSE;
+ if (reply->forwarded)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
struct smtp_server_reply *
smtp_server_command_get_reply(struct smtp_server_command *cmd,
unsigned int idx)
bool submitted:1;
bool sent:1;
+ bool forwarded:1;
};
struct smtp_server_command_reg {
reply->command->replies_submitted--;
}
reply->submitted = FALSE;
+ reply->forwarded = FALSE;
}
static struct smtp_server_reply *
reply = smtp_server_reply_create_index(cmd, index,
from->status, smtp_reply_get_enh_code(from));
smtp_reply_write(reply->content->text, from);
+ reply->forwarded = TRUE;
return reply;
}
bool smtp_server_command_reply_status_equals(struct smtp_server_command *cmd,
unsigned int status);
bool smtp_server_command_is_replied(struct smtp_server_command *cmd);
+bool smtp_server_command_reply_is_forwarded(struct smtp_server_command *cmd);
bool smtp_server_command_replied_success(struct smtp_server_command *cmd);
void smtp_server_command_input_lock(struct smtp_server_cmd_ctx *cmd);